* Add missing spaces after and before operators * Add blank lines where recommended by checkpatch.pl * Remove extra blank lines where recommended by checkpatch.pl Signed-off-by: Anish Bhatt <anish@xxxxxxxxxxx> --- drivers/staging/fbtft/fb_agm1264k-fl.c | 5 ++--- drivers/staging/fbtft/fb_bd663474.c | 1 + drivers/staging/fbtft/fb_hx8340bn.c | 7 +++---- drivers/staging/fbtft/fb_hx8347d.c | 6 +++--- drivers/staging/fbtft/fb_hx8353d.c | 3 +-- drivers/staging/fbtft/fb_hx8357d.c | 2 +- drivers/staging/fbtft/fb_ili9163.c | 5 +++-- drivers/staging/fbtft/fb_ili9320.c | 9 ++++----- drivers/staging/fbtft/fb_ili9325.c | 9 ++++----- drivers/staging/fbtft/fb_ili9340.c | 3 +-- drivers/staging/fbtft/fb_ili9341.c | 8 ++++---- drivers/staging/fbtft/fb_ili9481.c | 2 +- drivers/staging/fbtft/fb_ili9486.c | 3 +-- drivers/staging/fbtft/fb_pcd8544.c | 10 +++++----- drivers/staging/fbtft/fb_ra8875.c | 9 +++++---- drivers/staging/fbtft/fb_s6d02a1.c | 2 +- drivers/staging/fbtft/fb_s6d1121.c | 7 ++++--- drivers/staging/fbtft/fb_ssd1289.c | 8 ++++---- drivers/staging/fbtft/fb_ssd1306.c | 12 ++++++------ drivers/staging/fbtft/fb_ssd1331.c | 2 -- drivers/staging/fbtft/fb_ssd1351.c | 12 +++++------- drivers/staging/fbtft/fb_st7735r.c | 6 +++--- drivers/staging/fbtft/fb_tinylcd.c | 3 +-- drivers/staging/fbtft/fb_tls8204.c | 8 ++++---- drivers/staging/fbtft/fb_uc1701.c | 17 +++++++++-------- drivers/staging/fbtft/fb_upd161704.c | 1 + drivers/staging/fbtft/fb_watterott.c | 4 ++-- drivers/staging/fbtft/fbtft-bus.c | 13 ++++--------- drivers/staging/fbtft/fbtft-core.c | 16 +++++----------- drivers/staging/fbtft/fbtft-sysfs.c | 6 ++---- drivers/staging/fbtft/fbtft_device.c | 7 ++----- 31 files changed, 92 insertions(+), 114 deletions(-) diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c index 94dd49c..9d74e61 100644 --- a/drivers/staging/fbtft/fb_agm1264k-fl.c +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c @@ -41,8 +41,7 @@ #define CS0 gpio.aux[0] #define CS1 gpio.aux[1] - -/* diffusing error (“Floyd-Steinberg”) */ +/* diffusing error (Floyd-Steinberg) */ #define DIFFUSING_MATRIX_WIDTH 2 #define DIFFUSING_MATRIX_HEIGHT 2 @@ -420,7 +419,6 @@ static int write(struct fbtft_par *par, void *buf, size_t len) gpio_set_value(par->RW, 0); /* set write mode */ - while (len--) { u8 i, data; @@ -456,6 +454,7 @@ static struct fbtft_display display = { .write_vmem = write_vmem, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display); MODULE_ALIAS("platform:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_bd663474.c b/drivers/staging/fbtft/fb_bd663474.c index 69eb6d2..3614cd7 100644 --- a/drivers/staging/fbtft/fb_bd663474.c +++ b/drivers/staging/fbtft/fb_bd663474.c @@ -177,6 +177,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "hitachi,bd663474", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c index c5b2e51..df2e213 100644 --- a/drivers/staging/fbtft/fb_hx8340bn.c +++ b/drivers/staging/fbtft/fb_hx8340bn.c @@ -35,12 +35,10 @@ #define DEFAULT_GAMMA "1 3 0E 5 0 2 09 0 6 1 7 1 0 2 2\n" \ "3 3 17 8 4 7 05 7 6 0 3 1 6 0 0 " - static bool emulate; module_param(emulate, bool, 0); MODULE_PARM_DESC(emulate, "Force emulation in 9-bit mode"); - static int init_display(struct fbtft_par *par) { par->fbtftops.reset(par); @@ -141,7 +139,7 @@ static int set_var(struct fbtft_par *par) OP0 OP1 CP0 CP1 CP2 CP3 CP4 MP0 MP1 MP2 MP3 MP4 MP5 CGM0 CGM1 ON0 ON1 CN0 CN1 CN2 CN3 CN4 MN0 MN1 MN2 MN3 MN4 MN5 XXXX GC */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -186,8 +184,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 8, @@ -204,6 +202,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8340bn", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_hx8347d.c b/drivers/staging/fbtft/fb_hx8347d.c index 14692f2..04d7a1b 100644 --- a/drivers/staging/fbtft/fb_hx8347d.c +++ b/drivers/staging/fbtft/fb_hx8347d.c @@ -29,7 +29,6 @@ #define DEFAULT_GAMMA "0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" \ "0 0 0 0 0 0 0 0 0 0 0 0 0 0" - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -106,7 +105,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) VRP0 VRP1 VRP2 VRP3 VRP4 VRP5 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 CGM VRN0 VRN1 VRN2 VRN3 VRN4 VRN5 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 CGM */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -147,8 +146,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 8, @@ -163,6 +162,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_hx8353d.c b/drivers/staging/fbtft/fb_hx8353d.c index 6b6d462..0b7f359 100644 --- a/drivers/staging/fbtft/fb_hx8353d.c +++ b/drivers/staging/fbtft/fb_hx8353d.c @@ -27,7 +27,6 @@ static int init_display(struct fbtft_par *par) { - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); par->fbtftops.reset(par); @@ -134,7 +133,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = 128, @@ -149,6 +147,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_hx8357d.c b/drivers/staging/fbtft/fb_hx8357d.c index 77c2afc..352b030 100644 --- a/drivers/staging/fbtft/fb_hx8357d.c +++ b/drivers/staging/fbtft/fb_hx8357d.c @@ -30,7 +30,6 @@ #define WIDTH 320 #define HEIGHT 480 - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -206,6 +205,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c index 7762d19..3e3f4cf 100644 --- a/drivers/staging/fbtft/fb_ili9163.c +++ b/drivers/staging/fbtft/fb_ili9163.c @@ -229,7 +229,7 @@ static int set_var(struct fbtft_par *par) } #ifdef GAMMA_ADJ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int gamma_adj(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -242,7 +242,7 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves) for (i = 0; i < GAMMA_NUM; i++) for (j = 0; j < GAMMA_LEN; j++) - CURVE(i, j) &= mask[i*par->gamma.num_values + j]; + CURVE(i, j) &= mask[i * par->gamma.num_values + j]; write_reg(par, CMD_PGAMMAC, CURVE(0, 0), @@ -266,6 +266,7 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves) return 0; } + #undef CURVE #endif diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c index 094f729..657ae56 100644 --- a/drivers/staging/fbtft/fb_ili9320.c +++ b/drivers/staging/fbtft/fb_ili9320.c @@ -29,7 +29,6 @@ #define DEFAULT_GAMMA "07 07 6 0 0 0 5 5 4 0\n" \ "07 08 4 7 5 1 2 0 7 7" - static unsigned read_devicecode(struct fbtft_par *par) { int ret; @@ -92,7 +91,6 @@ static int init_display(struct fbtft_par *par) /* RGB interface polarity */ write_reg(par, 0x000F, 0x0000); - /* ***********Power On sequence *************** */ /* SAP, BT[3:0], AP, DSTB, SLP, STB */ write_reg(par, 0x0010, 0x0000); @@ -228,7 +226,7 @@ static int set_var(struct fbtft_par *par) VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5 VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5 */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -242,7 +240,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) /* apply mask */ for (i = 0; i < 2; i++) for (j = 0; j < 10; j++) - CURVE(i, j) &= mask[i*par->gamma.num_values + j]; + CURVE(i, j) &= mask[i * par->gamma.num_values + j]; write_reg(par, 0x0030, CURVE(0, 5) << 8 | CURVE(0, 4)); write_reg(par, 0x0031, CURVE(0, 7) << 8 | CURVE(0, 6)); @@ -258,8 +256,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 16, @@ -275,6 +273,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9325.c b/drivers/staging/fbtft/fb_ili9325.c index ad25d82..f1a55cd 100644 --- a/drivers/staging/fbtft/fb_ili9325.c +++ b/drivers/staging/fbtft/fb_ili9325.c @@ -32,7 +32,6 @@ #define DEFAULT_GAMMA "0F 00 7 2 0 0 6 5 4 1\n" \ "04 16 2 7 6 3 2 1 7 7" - static unsigned bt = 6; /* VGL=Vci*4 , VGH=Vci*4 */ module_param(bt, uint, 0); MODULE_PARM_DESC(bt, "Sets the factor used in the step-up circuits"); @@ -56,7 +55,6 @@ static unsigned vcm = 0x0a; /* VCOMH=VREG1OUT*0.735 */ module_param(vcm, uint, 0); MODULE_PARM_DESC(vcm, "Set the internal VcomH voltage"); - /* Verify that this configuration is within the Voltage limits @@ -225,7 +223,7 @@ static int set_var(struct fbtft_par *par) VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5 VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5 */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -239,7 +237,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) /* apply mask */ for (i = 0; i < 2; i++) for (j = 0; j < 10; j++) - CURVE(i, j) &= mask[i*par->gamma.num_values + j]; + CURVE(i, j) &= mask[i * par->gamma.num_values + j]; write_reg(par, 0x0030, CURVE(0, 5) << 8 | CURVE(0, 4)); write_reg(par, 0x0031, CURVE(0, 7) << 8 | CURVE(0, 6)); @@ -255,8 +253,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 16, @@ -274,6 +272,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9325", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9340.c b/drivers/staging/fbtft/fb_ili9340.c index 5141389..70174a8 100644 --- a/drivers/staging/fbtft/fb_ili9340.c +++ b/drivers/staging/fbtft/fb_ili9340.c @@ -26,7 +26,6 @@ #define WIDTH 240 #define HEIGHT 320 - /* Init sequence taken from: Arduino Library for the Adafruit 2.2" display */ static int init_display(struct fbtft_par *par) { @@ -135,7 +134,6 @@ static int set_var(struct fbtft_par *par) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -146,6 +144,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9340", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c index dfad2f2..fe68dd9 100644 --- a/drivers/staging/fbtft/fb_ili9341.c +++ b/drivers/staging/fbtft/fb_ili9341.c @@ -34,7 +34,6 @@ #define DEFAULT_GAMMA "1F 1A 18 0A 0F 06 45 87 32 0A 07 02 07 05 00\n" \ "00 25 27 05 10 09 3A 78 4D 05 18 0D 38 3A 1F" - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -108,7 +107,7 @@ static int set_var(struct fbtft_par *par) break; case 270: write_reg(par, 0x36, - (1<<MEM_V) | (1 << MEM_L) | (par->bgr << MEM_BGR)); + (1 << MEM_V) | (1 << MEM_L) | (par->bgr << MEM_BGR)); break; case 180: write_reg(par, 0x36, (1 << MEM_Y) | (par->bgr << MEM_BGR)); @@ -127,7 +126,7 @@ static int set_var(struct fbtft_par *par) Positive: Par1 Par2 [...] Par15 Negative: Par1 Par2 [...] Par15 */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { int i; @@ -144,8 +143,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 8, @@ -162,6 +161,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c index 0884930..1eecd20 100644 --- a/drivers/staging/fbtft/fb_ili9481.c +++ b/drivers/staging/fbtft/fb_ili9481.c @@ -27,7 +27,6 @@ #define HEIGHT 480 static int default_init_sequence[] = { - /* SLP_OUT - Sleep out */ -1, 0x11, -2, 50, @@ -100,6 +99,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9481", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ili9486.c b/drivers/staging/fbtft/fb_ili9486.c index 883e74d..87e2ddc 100644 --- a/drivers/staging/fbtft/fb_ili9486.c +++ b/drivers/staging/fbtft/fb_ili9486.c @@ -24,7 +24,6 @@ #define WIDTH 320 #define HEIGHT 480 - /* this init sequence matches PiScreen */ static int default_init_sequence[] = { /* Interface Mode Control */ @@ -93,7 +92,6 @@ static int set_var(struct fbtft_par *par) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -104,6 +102,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9486", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c index 4cef1c4..7e0edae 100644 --- a/drivers/staging/fbtft/fb_pcd8544.c +++ b/drivers/staging/fbtft/fb_pcd8544.c @@ -29,7 +29,7 @@ #define DRVNAME "fb_pcd8544" #define WIDTH 84 #define HEIGHT 48 -#define TXBUFLEN (84*6) +#define TXBUFLEN (84 * 6) #define DEFAULT_GAMMA "40" /* gamma controls the contrast in this driver */ static unsigned tc; @@ -40,7 +40,6 @@ static unsigned bs = 4; module_param(bs, uint, 0); MODULE_PARM_DESC(bs, "BS[2:0] Bias voltage level: 0-7 (default: 4)"); - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -128,14 +127,15 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) for (y = 0; y < 6; y++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[(y*8+i)*84+x] ? 1 : 0) << i; + *buf |= (vmem16[(y * 8 + i) * 84 + x] ? + 1 : 0) << i; buf++; } } /* Write data */ gpio_set_value(par->gpio.dc, 1); - ret = par->fbtftops.write(par, par->txbuf.buf, 6*84); + ret = par->fbtftops.write(par, par->txbuf.buf, 6 * 84); if (ret < 0) dev_err(par->info->device, "write failed and returned: %d\n", ret); @@ -157,7 +157,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -174,6 +173,7 @@ static struct fbtft_display display = { }, .backlight = 1, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "philips,pdc8544", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index eaac112..bba4c7b 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -189,10 +189,10 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) write_reg(par, 0x31, (xs & 0xFF00) >> 8); write_reg(par, 0x32, ys & 0x00FF); write_reg(par, 0x33, (ys & 0xFF00) >> 8); - write_reg(par, 0x34, (xs+xe) & 0x00FF); - write_reg(par, 0x35, ((xs+xe) & 0xFF00) >> 8); - write_reg(par, 0x36, (ys+ye) & 0x00FF); - write_reg(par, 0x37, ((ys+ye) & 0xFF00) >> 8); + write_reg(par, 0x34, (xs + xe) & 0x00FF); + write_reg(par, 0x35, ((xs + xe) & 0xFF00) >> 8); + write_reg(par, 0x36, (ys + ye) & 0x00FF); + write_reg(par, 0x37, ((ys + ye) & 0xFF00) >> 8); /* Set_Memory_Write_Cursor */ write_reg(par, 0x46, xs & 0xff); @@ -308,6 +308,7 @@ static struct fbtft_display display = { .write = write_spi, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "raio,ra8875", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_s6d02a1.c b/drivers/staging/fbtft/fb_s6d02a1.c index fe4fedf..2de8062 100644 --- a/drivers/staging/fbtft/fb_s6d02a1.c +++ b/drivers/staging/fbtft/fb_s6d02a1.c @@ -24,7 +24,6 @@ #define DRVNAME "fb_s6d02a1" static int default_init_sequence[] = { - -1, 0xf0, 0x5a, 0x5a, -1, 0xfc, 0x5a, 0x5a, @@ -151,6 +150,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "samsung,s6d02a1", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_s6d1121.c b/drivers/staging/fbtft/fb_s6d1121.c index f36e652..a761ecc 100644 --- a/drivers/staging/fbtft/fb_s6d1121.c +++ b/drivers/staging/fbtft/fb_s6d1121.c @@ -135,7 +135,7 @@ static int set_var(struct fbtft_par *par) PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 PKP6 PKP7 PKP8 PKP9 PKP10 PKP11 VRP0 VRP1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 PKN6 PKN7 PRN8 PRN9 PRN10 PRN11 VRN0 VRN1 */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -150,7 +150,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) /* apply mask */ for (i = 0; i < 2; i++) for (j = 0; j < 14; j++) - CURVE(i, j) &= mask[i*par->gamma.num_values + j]; + CURVE(i, j) &= mask[i * par->gamma.num_values + j]; write_reg(par, 0x0030, CURVE(0, 1) << 8 | CURVE(0, 0)); write_reg(par, 0x0031, CURVE(0, 3) << 8 | CURVE(0, 2)); @@ -171,8 +171,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 16, @@ -190,6 +190,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "samsung,s6d1121", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ssd1289.c b/drivers/staging/fbtft/fb_ssd1289.c index f2e7740..4676719 100644 --- a/drivers/staging/fbtft/fb_ssd1289.c +++ b/drivers/staging/fbtft/fb_ssd1289.c @@ -33,7 +33,6 @@ static unsigned reg11 = 0x6040; module_param(reg11, uint, 0); MODULE_PARM_DESC(reg11, "Register 11h value"); - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -142,7 +141,7 @@ static int set_var(struct fbtft_par *par) VRP0 VRP1 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 VRN0 VRN1 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { @@ -156,7 +155,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) /* apply mask */ for (i = 0; i < 2; i++) for (j = 0; j < 10; j++) - CURVE(i, j) &= mask[i*par->gamma.num_values + j]; + CURVE(i, j) &= mask[i * par->gamma.num_values + j]; write_reg(par, 0x0030, CURVE(0, 5) << 8 | CURVE(0, 4)); write_reg(par, 0x0031, CURVE(0, 7) << 8 | CURVE(0, 6)); @@ -171,8 +170,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 16, @@ -188,6 +187,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1289", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c index a237967..9e8f0f0 100644 --- a/drivers/staging/fbtft/fb_ssd1306.c +++ b/drivers/staging/fbtft/fb_ssd1306.c @@ -26,7 +26,6 @@ #define WIDTH 128 #define HEIGHT 64 - /* write_reg() caveat: @@ -175,10 +174,12 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s()\n", __func__); for (x = 0; x < par->info->var.xres; x++) { - for (y = 0; y < par->info->var.yres/8; y++) { + for (y = 0; y < par->info->var.yres / 8; y++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[(y*8+i)*par->info->var.xres+x] ? 1 : 0) << i; + *buf |= (vmem16[(y * 8 + i) * + par->info->var.xres + x] ? + 1 : 0) << i; buf++; } } @@ -186,7 +187,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) /* Write data */ gpio_set_value(par->gpio.dc, 1); ret = par->fbtftops.write(par, par->txbuf.buf, - par->info->var.xres*par->info->var.yres/8); + par->info->var.xres * par->info->var.yres / + 8); if (ret < 0) dev_err(par->info->device, "write failed and returned: %d\n", ret); @@ -194,7 +196,6 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) return ret; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -211,7 +212,6 @@ static struct fbtft_display display = { }, }; - FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1306", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index 8efb7ce..31b6aff 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -125,7 +125,6 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) : Setting of GS63 has to be > Setting of GS62 +1 - */ static int set_gamma(struct fbtft_par *par, unsigned long *curves) { @@ -175,7 +174,6 @@ static int blank(struct fbtft_par *par, bool on) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c index 1330d3c..2e8f924 100644 --- a/drivers/staging/fbtft/fb_ssd1351.c +++ b/drivers/staging/fbtft/fb_ssd1351.c @@ -27,8 +27,8 @@ static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); - if (par->pdata - && par->pdata->display.backlight == FBTFT_ONBOARD_BACKLIGHT) { + if (par->pdata && + par->pdata->display.backlight == FBTFT_ONBOARD_BACKLIGHT) { /* module uses onboard GPIO for panel power */ par->fbtftops.register_backlight = register_onboard_backlight; } @@ -122,7 +122,6 @@ static int set_var(struct fbtft_par *par) : Setting of GS63 has to be > Setting of GS62 +1 - */ static int set_gamma(struct fbtft_par *par, unsigned long *curves) { @@ -172,7 +171,6 @@ static int blank(struct fbtft_par *par, bool on) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -199,8 +197,8 @@ static int update_onboard_backlight(struct backlight_device *bd) "%s: power=%d, fb_blank=%d\n", __func__, bd->props.power, bd->props.fb_blank); - on = (bd->props.power == FB_BLANK_UNBLANK) - && (bd->props.fb_blank == FB_BLANK_UNBLANK); + on = (bd->props.power == FB_BLANK_UNBLANK) && + (bd->props.fb_blank == FB_BLANK_UNBLANK); /* Onboard backlight connected to GPIO0 on SSD1351, GPIO1 unused */ write_reg(par, 0xB5, on ? 0x03 : 0x02); @@ -237,11 +235,11 @@ static void register_onboard_backlight(struct fbtft_par *par) if (!par->fbtftops.unregister_backlight) par->fbtftops.unregister_backlight = fbtft_unregister_backlight; } + #else static void register_onboard_backlight(struct fbtft_par *par) { }; #endif - FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1351", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_st7735r.c b/drivers/staging/fbtft/fb_st7735r.c index 71ec2d8..15bd0f3 100644 --- a/drivers/staging/fbtft/fb_st7735r.c +++ b/drivers/staging/fbtft/fb_st7735r.c @@ -24,7 +24,6 @@ #define DEFAULT_GAMMA "0F 1A 0F 18 2F 28 20 22 1F 1B 23 37 00 07 02 10\n" \ "0F 1B 0F 17 33 2C 29 2E 30 30 39 3F 00 07 03 10" - static int default_init_sequence[] = { /* SWRESET - Software reset */ -1, 0x01, @@ -140,7 +139,7 @@ static int set_var(struct fbtft_par *par) VRF0P VOS0P PK0P PK1P PK2P PK3P PK4P PK5P PK6P PK7P PK8P PK9P SELV0P SELV1P SELV62P SELV63P VRF0N VOS0N PK0N PK1N PK2N PK3N PK4N PK5N PK6N PK7N PK8N PK9N SELV0N SELV1N SELV62N SELV63N */ -#define CURVE(num, idx) curves[num*par->gamma.num_values + idx] +#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { int i, j; @@ -161,8 +160,8 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } -#undef CURVE +#undef CURVE static struct fbtft_display display = { .regwidth = 8, @@ -178,6 +177,7 @@ static struct fbtft_display display = { .set_gamma = set_gamma, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "sitronix,st7735r", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c index 8acb740..02dd1e8 100644 --- a/drivers/staging/fbtft/fb_tinylcd.c +++ b/drivers/staging/fbtft/fb_tinylcd.c @@ -25,7 +25,6 @@ #define WIDTH 320 #define HEIGHT 480 - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -98,7 +97,6 @@ static int set_var(struct fbtft_par *par) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -109,6 +107,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "neosec,tinylcd", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_tls8204.c b/drivers/staging/fbtft/fb_tls8204.c index 551039d..2f38186 100644 --- a/drivers/staging/fbtft/fb_tls8204.c +++ b/drivers/staging/fbtft/fb_tls8204.c @@ -104,7 +104,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s()\n", __func__); - for (y = 0; y < HEIGHT/8; y++) { + for (y = 0; y < HEIGHT / 8; y++) { u8 *buf = par->txbuf.buf; /* The display is 102x68 but the LCD is 84x48. Set the write pointer at the start of each row. */ @@ -115,9 +115,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) for (x = 0; x < WIDTH; x++) { u8 ch = 0; - for (i = 0; i < 8*WIDTH; i += WIDTH) { + for (i = 0; i < 8 * WIDTH; i += WIDTH) { ch >>= 1; - if (vmem16[(y*8*WIDTH)+i+x]) + if (vmem16[(y * 8 * WIDTH) + i + x]) ch |= 0x80; } *buf++ = ch; @@ -149,7 +149,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -166,6 +165,7 @@ static struct fbtft_display display = { }, .backlight = 1, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "teralane,tls8204", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_uc1701.c b/drivers/staging/fbtft/fb_uc1701.c index e531972..f9ab18a 100644 --- a/drivers/staging/fbtft/fb_uc1701.c +++ b/drivers/staging/fbtft/fb_uc1701.c @@ -27,9 +27,9 @@ #include "fbtft.h" #define DRVNAME "fb_uc1701" -#define WIDTH 102 -#define HEIGHT 64 -#define PAGES (HEIGHT/8) +#define WIDTH 102 +#define HEIGHT 64 +#define PAGES (HEIGHT / 8) /* 1: Display on/off */ #define LCD_DISPLAY_ENABLE 0xAE @@ -69,7 +69,6 @@ /* column offset for bottom view orientation */ #define SHIFT_ADDR_TOPVIEW 30 - static int init_display(struct fbtft_par *par) { fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); @@ -117,7 +116,7 @@ static int init_display(struct fbtft_par *par) /* advanced program control */ write_reg(par, LCD_ADV_PROG_CTRL); - write_reg(par, LCD_ADV_PROG_CTRL2|LCD_TEMPCOMP_HIGH); + write_reg(par, LCD_ADV_PROG_CTRL2 | LCD_TEMPCOMP_HIGH); /* enable display */ write_reg(par, LCD_DISPLAY_ENABLE | 1); @@ -158,13 +157,15 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) for (x = 0; x < WIDTH; x++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[((y*8*WIDTH)+(i*WIDTH))+x] ? 1 : 0) << i; + *buf |= (vmem16[((y * 8 * WIDTH) + + (i * WIDTH)) + x] ? + 1 : 0) << i; buf++; } /* LCD_PAGE_ADDRESS | ((page) & 0x1F), (((col)+SHIFT_ADDR_NORMAL) & 0x0F), LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */ - write_reg(par, LCD_PAGE_ADDRESS|(u8)y); + write_reg(par, LCD_PAGE_ADDRESS | (u8)y); /* LCD_PAGE_ADDRESS | ((page) & 0x1F), (((col)+SHIFT_ADDR_NORMAL) & 0x0F), LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */ @@ -185,7 +186,6 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) return ret; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -197,6 +197,7 @@ static struct fbtft_display display = { }, .backlight = 1, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "UltraChip,uc1701", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_upd161704.c b/drivers/staging/fbtft/fb_upd161704.c index e3387ca..7cb8650 100644 --- a/drivers/staging/fbtft/fb_upd161704.c +++ b/drivers/staging/fbtft/fb_upd161704.c @@ -190,6 +190,7 @@ static struct fbtft_display display = { .set_var = set_var, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "nec,upd161704", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c index 33c21f1..7c4c6bd 100644 --- a/drivers/staging/fbtft/fb_watterott.c +++ b/drivers/staging/fbtft/fb_watterott.c @@ -39,7 +39,6 @@ #define COLOR_RGB233 10 #define COLOR_RGB565 16 - static short mode = 565; module_param(mode, short, 0); MODULE_PARM_DESC(mode, "RGB color transfer mode: 332, 565 (default)"); @@ -289,11 +288,11 @@ static void register_chip_backlight(struct fbtft_par *par) if (!par->fbtftops.unregister_backlight) par->fbtftops.unregister_backlight = fbtft_unregister_backlight; } + #else #define register_chip_backlight NULL #endif - static struct fbtft_display display = { .regwidth = 8, .buswidth = 8, @@ -311,6 +310,7 @@ static struct fbtft_display display = { .register_backlight = register_chip_backlight, }, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "watterott,openlcd", &display); MODULE_ALIAS("spi:" DRVNAME); diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 912c632..9712924 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -4,9 +4,6 @@ #include <linux/spi/spi.h> #include "fbtft.h" - - - /***************************************************************************** * * void (*write_reg)(struct fbtft_par *par, int len, ...); @@ -41,7 +38,7 @@ void func(struct fbtft_par *par, int len, ...) \ *buf = modifier((type)va_arg(args, unsigned int)); \ if (par->gpio.dc != -1) \ gpio_set_value(par->gpio.dc, 0); \ - ret = par->fbtftops.write(par, par->buf, sizeof(type)+offset); \ + ret = par->fbtftops.write(par, par->buf, sizeof(type) + offset); \ if (ret < 0) { \ va_end(args); \ dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \ @@ -59,7 +56,8 @@ void func(struct fbtft_par *par, int len, ...) \ } \ if (par->gpio.dc != -1) \ gpio_set_value(par->gpio.dc, 1); \ - ret = par->fbtftops.write(par, par->buf, len * (sizeof(type)+offset)); \ + ret = par->fbtftops.write(par, par->buf, \ + len * (sizeof(type) + offset)); \ if (ret < 0) { \ va_end(args); \ dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \ @@ -117,9 +115,6 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) } EXPORT_SYMBOL(fbtft_write_reg8_bus9); - - - /***************************************************************************** * * int (*write_vmem)(struct fbtft_par *par); @@ -220,7 +215,7 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) txbuf16[i] = 0x0100 | ioread8(vmem8 + i); #endif vmem8 = vmem8 + to_copy; - ret = par->fbtftops.write(par, par->txbuf.buf, to_copy*2); + ret = par->fbtftops.write(par, par->txbuf.buf, to_copy * 2); if (ret < 0) return ret; remain -= to_copy; diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 1dc39b8..fb172fe 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -49,7 +49,6 @@ module_param(dma, bool, 0); MODULE_PARM_DESC(dma, "Use DMA buffer"); #endif - void fbtft_dbg_hex(const struct device *dev, int groupsize, void *buf, size_t len, const char *fmt, ...) { @@ -341,7 +340,6 @@ static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, write_reg(par, 0x2C); } - static void fbtft_reset(struct fbtft_par *par) { if (par->gpio.reset == -1) @@ -353,7 +351,6 @@ static void fbtft_reset(struct fbtft_par *par) mdelay(120); } - static void fbtft_update_display(struct fbtft_par *par, unsigned start_line, unsigned end_line) { @@ -393,7 +390,7 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned start_line, if (par->fbtftops.set_addr_win) par->fbtftops.set_addr_win(par, 0, start_line, - par->info->var.xres-1, end_line); + par->info->var.xres - 1, end_line); offset = start_line * par->info->fix.line_length; len = (end_line - start_line + 1) * par->info->fix.line_length; @@ -432,7 +429,6 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned start_line, } } - static void fbtft_mkdirty(struct fb_info *info, int y, int height) { struct fbtft_par *par = info->par; @@ -494,7 +490,6 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist) dirty_lines_start, dirty_lines_end); } - static void fbtft_fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { @@ -583,7 +578,6 @@ static int fbtft_fb_setcolreg(unsigned regno, unsigned red, unsigned green, ret = 0; } break; - } return ret; } @@ -795,7 +789,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, info->fix.xpanstep = 0; info->fix.ypanstep = 0; info->fix.ywrapstep = 0; - info->fix.line_length = width*bpp/8; + info->fix.line_length = width * bpp / 8; info->fix.accel = FB_ACCEL_NONE; info->fix.smem_len = vmem_size; @@ -991,12 +985,12 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) par->txbuf.len >> 10, par->txbuf.dma ? "DMA " : ""); if (spi) sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num, - spi->chip_select, spi->max_speed_hz/1000000); + spi->chip_select, spi->max_speed_hz / 1000000); dev_info(fb_info->dev, "%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n", fb_info->fix.id, fb_info->var.xres, fb_info->var.yres, fb_info->fix.smem_len >> 10, text1, - HZ/fb_info->fbdefio->delay, text2); + HZ / fb_info->fbdefio->delay, text2); #ifdef CONFIG_FB_BACKLIGHT /* Turn on backlight if available */ @@ -1178,7 +1172,7 @@ int fbtft_init_display(struct fbtft_par *par) "missing delimiter at position %d\n", i); return -EINVAL; } - if (par->init_sequence[i+1] < 0) { + if (par->init_sequence[i + 1] < 0) { dev_err(par->info->device, "missing value after delimiter %d at position %d\n", par->init_sequence[i], i); diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c index c4cc452..8d8bd12 100644 --- a/drivers/staging/fbtft/fbtft-sysfs.c +++ b/drivers/staging/fbtft/fbtft-sysfs.c @@ -103,8 +103,8 @@ sprintf_gamma(struct fbtft_par *par, unsigned long *curves, char *buf) for (i = 0; i < par->gamma.num_curves; i++) { for (j = 0; j < par->gamma.num_values; j++) len += scnprintf(&buf[len], PAGE_SIZE, - "%04lx ", curves[i*par->gamma.num_values + j]); - buf[len-1] = '\n'; + "%04lx ", curves[i * par->gamma.num_values + j]); + buf[len - 1] = '\n'; } mutex_unlock(&par->gamma.lock); @@ -149,7 +149,6 @@ static struct device_attribute gamma_device_attrs[] = { __ATTR(gamma, 0660, show_gamma_curve, store_gamma_curve), }; - void fbtft_expand_debug_value(unsigned long *debug) { switch (*debug & 0x7) { @@ -205,7 +204,6 @@ static ssize_t show_debug(struct device *device, static struct device_attribute debug_device_attr = \ __ATTR(debug, 0660, show_debug, store_debug); - void fbtft_sysfs_init(struct fbtft_par *par) { device_create_file(par->info->dev, &debug_device_attr); diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index bf61df5..480ac0e 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -111,7 +111,6 @@ module_param(verbose, uint, 0); MODULE_PARM_DESC(verbose, "0 silent, >0 show gpios, >1 show devices, >2 show devices before (default=3)"); - struct fbtft_device_display { char *name; struct spi_board_info *spi; @@ -743,7 +742,6 @@ static struct fbtft_device_display displays[] = { } } }, { - .name = "piscreen", .spi = &(struct spi_board_info) { .modalias = "fb_ili9486", @@ -1205,7 +1203,7 @@ static void adafruit18_green_tab_set_addr_win(struct fbtft_par *par, } /* used if gpios parameter is present */ -static struct fbtft_gpio fbtft_device_param_gpios[MAX_GPIOS+1] = { }; +static struct fbtft_gpio fbtft_device_param_gpios[MAX_GPIOS + 1] = { }; static void fbtft_device_pdev_release(struct device *dev) { @@ -1219,7 +1217,7 @@ static int spi_device_found(struct device *dev, void *data) struct spi_device *spi = container_of(dev, struct spi_device, dev); pr_info(DRVNAME": %s %s %dkHz %d bits mode=0x%02X\n", - spi->modalias, dev_name(dev), spi->max_speed_hz/1000, + spi->modalias, dev_name(dev), spi->max_speed_hz / 1000, spi->bits_per_word, spi->mode); return 0; @@ -1500,7 +1498,6 @@ static void __exit fbtft_device_exit(void) if (p_device) platform_device_unregister(p_device); - } arch_initcall(fbtft_device_init); -- 2.5.1
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel