diff options
Diffstat (limited to 'drivers/video/ssd1307fb.c')
-rw-r--r-- | drivers/video/ssd1307fb.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c index 6101f5c2f62f..395cb6a8d8f3 100644 --- a/drivers/video/ssd1307fb.c +++ b/drivers/video/ssd1307fb.c | |||
@@ -36,7 +36,7 @@ struct ssd1307fb_par { | |||
36 | int reset; | 36 | int reset; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = { | 39 | static struct fb_fix_screeninfo ssd1307fb_fix = { |
40 | .id = "Solomon SSD1307", | 40 | .id = "Solomon SSD1307", |
41 | .type = FB_TYPE_PACKED_PIXELS, | 41 | .type = FB_TYPE_PACKED_PIXELS, |
42 | .visual = FB_VISUAL_MONO10, | 42 | .visual = FB_VISUAL_MONO10, |
@@ -47,7 +47,7 @@ static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = { | |||
47 | .accel = FB_ACCEL_NONE, | 47 | .accel = FB_ACCEL_NONE, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static struct fb_var_screeninfo ssd1307fb_var __devinitdata = { | 50 | static struct fb_var_screeninfo ssd1307fb_var = { |
51 | .xres = SSD1307FB_WIDTH, | 51 | .xres = SSD1307FB_WIDTH, |
52 | .yres = SSD1307FB_HEIGHT, | 52 | .yres = SSD1307FB_HEIGHT, |
53 | .xres_virtual = SSD1307FB_WIDTH, | 53 | .xres_virtual = SSD1307FB_WIDTH, |
@@ -145,8 +145,8 @@ static void ssd1307fb_update_display(struct ssd1307fb_par *par) | |||
145 | u32 page_length = SSD1307FB_WIDTH * i; | 145 | u32 page_length = SSD1307FB_WIDTH * i; |
146 | u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8; | 146 | u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8; |
147 | u8 byte = *(vmem + index); | 147 | u8 byte = *(vmem + index); |
148 | u8 bit = byte & (1 << (7 - (j % 8))); | 148 | u8 bit = byte & (1 << (j % 8)); |
149 | bit = bit >> (7 - (j % 8)); | 149 | bit = bit >> (j % 8); |
150 | buf |= bit << k; | 150 | buf |= bit << k; |
151 | } | 151 | } |
152 | ssd1307fb_write_data(par->client, buf); | 152 | ssd1307fb_write_data(par->client, buf); |
@@ -227,7 +227,8 @@ static struct fb_deferred_io ssd1307fb_defio = { | |||
227 | .deferred_io = ssd1307fb_deferred_io, | 227 | .deferred_io = ssd1307fb_deferred_io, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __devinit ssd1307fb_probe(struct i2c_client *client, const struct i2c_device_id *id) | 230 | static int ssd1307fb_probe(struct i2c_client *client, |
231 | const struct i2c_device_id *id) | ||
231 | { | 232 | { |
232 | struct fb_info *info; | 233 | struct fb_info *info; |
233 | u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8; | 234 | u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8; |
@@ -352,7 +353,7 @@ fb_alloc_error: | |||
352 | return ret; | 353 | return ret; |
353 | } | 354 | } |
354 | 355 | ||
355 | static int __devexit ssd1307fb_remove(struct i2c_client *client) | 356 | static int ssd1307fb_remove(struct i2c_client *client) |
356 | { | 357 | { |
357 | struct fb_info *info = i2c_get_clientdata(client); | 358 | struct fb_info *info = i2c_get_clientdata(client); |
358 | struct ssd1307fb_par *par = info->par; | 359 | struct ssd1307fb_par *par = info->par; |
@@ -380,7 +381,7 @@ MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); | |||
380 | 381 | ||
381 | static struct i2c_driver ssd1307fb_driver = { | 382 | static struct i2c_driver ssd1307fb_driver = { |
382 | .probe = ssd1307fb_probe, | 383 | .probe = ssd1307fb_probe, |
383 | .remove = __devexit_p(ssd1307fb_remove), | 384 | .remove = ssd1307fb_remove, |
384 | .id_table = ssd1307fb_i2c_id, | 385 | .id_table = ssd1307fb_i2c_id, |
385 | .driver = { | 386 | .driver = { |
386 | .name = "ssd1307fb", | 387 | .name = "ssd1307fb", |