Commit e6728ab7 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

hi846: define link_freqs entries to be of type u64

parent 18b44f8b
......@@ -1114,7 +1114,7 @@ static const char * const hi846_test_pattern_menu[] = {
#define FREQ_INDEX_640 0
#define FREQ_INDEX_1280 1
#define FREQ_INDEX_3264 2
static const s64 hi846_link_freqs[] = {
static const u64 hi846_link_freqs[] = {
[FREQ_INDEX_640] = 80000000,
[FREQ_INDEX_1280] = 200000000,
[FREQ_INDEX_3264] = 300000000,
......@@ -1308,7 +1308,7 @@ static inline u8 hi846_get_link_freq_index(struct hi846 *hi846)
return hi846->cur_mode->link_freq_index;
}
static s64 hi846_get_link_freq(struct hi846 *hi846)
static u64 hi846_get_link_freq(struct hi846 *hi846)
{
u8 index = hi846_get_link_freq_index(hi846);
......@@ -1317,7 +1317,7 @@ static s64 hi846_get_link_freq(struct hi846 *hi846)
static u64 hi846_calc_pixel_rate(struct hi846 *hi846)
{
s64 link_freq = hi846_get_link_freq(hi846);
u64 link_freq = hi846_get_link_freq(hi846);
u64 pixel_rate = link_freq * 2 * hi846->nr_lanes;
do_div(pixel_rate, HI846_RGB_DEPTH);
......@@ -1592,12 +1592,12 @@ static int hi846_init_controls(struct hi846 *hi846)
static int hi846_set_video_mode(struct hi846 *hi846, int fps)
{
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
int frame_length;
u64 frame_length;
int ret = 0;
int dummy_lines;
s64 link_freq = hi846_get_link_freq(hi846);
u64 link_freq = hi846_get_link_freq(hi846);
dev_dbg(&client->dev, "%s: link freq: %lld\n", __func__,
dev_dbg(&client->dev, "%s: link freq: %llu\n", __func__,
hi846_get_link_freq(hi846));
do_div(link_freq, fps);
......@@ -1609,7 +1609,7 @@ static int hi846_set_video_mode(struct hi846 *hi846, int fps)
frame_length = hi846->cur_mode->frame_len + dummy_lines;
dev_dbg(&client->dev, "%s: frame length calculated: %d\n", __func__,
dev_dbg(&client->dev, "%s: frame length calculated: %llu\n", __func__,
frame_length);
hi846_write_reg_16(hi846, HI846_REG_FLL, frame_length & 0xFFFF, &ret);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment