|
@@ -16,7 +16,7 @@ static int get_next_ulong(char **str_p, unsigned long *val, char *sep, int base)
|
|
return kstrtoul(p_val, base, val);
|
|
return kstrtoul(p_val, base, val);
|
|
}
|
|
}
|
|
|
|
|
|
-int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
|
|
|
|
|
|
+int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
|
|
const char *str, int size)
|
|
const char *str, int size)
|
|
{
|
|
{
|
|
char *str_p, *curve_p = NULL;
|
|
char *str_p, *curve_p = NULL;
|
|
@@ -89,7 +89,7 @@ out:
|
|
}
|
|
}
|
|
|
|
|
|
static ssize_t
|
|
static ssize_t
|
|
-sprintf_gamma(struct fbtft_par *par, unsigned long *curves, char *buf)
|
|
|
|
|
|
+sprintf_gamma(struct fbtft_par *par, u32 *curves, char *buf)
|
|
{
|
|
{
|
|
ssize_t len = 0;
|
|
ssize_t len = 0;
|
|
unsigned int i, j;
|
|
unsigned int i, j;
|
|
@@ -98,7 +98,7 @@ sprintf_gamma(struct fbtft_par *par, unsigned long *curves, char *buf)
|
|
for (i = 0; i < par->gamma.num_curves; i++) {
|
|
for (i = 0; i < par->gamma.num_curves; i++) {
|
|
for (j = 0; j < par->gamma.num_values; j++)
|
|
for (j = 0; j < par->gamma.num_values; j++)
|
|
len += scnprintf(&buf[len], PAGE_SIZE,
|
|
len += scnprintf(&buf[len], PAGE_SIZE,
|
|
- "%04lx ", curves[i * par->gamma.num_values + j]);
|
|
|
|
|
|
+ "%04x ", curves[i * par->gamma.num_values + j]);
|
|
buf[len - 1] = '\n';
|
|
buf[len - 1] = '\n';
|
|
}
|
|
}
|
|
mutex_unlock(&par->gamma.lock);
|
|
mutex_unlock(&par->gamma.lock);
|
|
@@ -112,7 +112,7 @@ static ssize_t store_gamma_curve(struct device *device,
|
|
{
|
|
{
|
|
struct fb_info *fb_info = dev_get_drvdata(device);
|
|
struct fb_info *fb_info = dev_get_drvdata(device);
|
|
struct fbtft_par *par = fb_info->par;
|
|
struct fbtft_par *par = fb_info->par;
|
|
- unsigned long tmp_curves[FBTFT_GAMMA_MAX_VALUES_TOTAL];
|
|
|
|
|
|
+ u32 tmp_curves[FBTFT_GAMMA_MAX_VALUES_TOTAL];
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ret = fbtft_gamma_parse_str(par, tmp_curves, buf, count);
|
|
ret = fbtft_gamma_parse_str(par, tmp_curves, buf, count);
|