diff options
Diffstat (limited to 'drivers/auxdisplay/cfag12864b.c')
-rw-r--r-- | drivers/auxdisplay/cfag12864b.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index 683509f013ab..eacb175f6bd3 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c | |||
@@ -336,16 +336,9 @@ static int __init cfag12864b_init(void) | |||
336 | "ks0108 is not initialized\n"); | 336 | "ks0108 is not initialized\n"); |
337 | goto none; | 337 | goto none; |
338 | } | 338 | } |
339 | BUILD_BUG_ON(PAGE_SIZE < CFAG12864B_SIZE); | ||
339 | 340 | ||
340 | if (PAGE_SIZE < CFAG12864B_SIZE) { | 341 | cfag12864b_buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL); |
341 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " | ||
342 | "page size (%i) < cfag12864b size (%i)\n", | ||
343 | (unsigned int)PAGE_SIZE, CFAG12864B_SIZE); | ||
344 | ret = -ENOMEM; | ||
345 | goto none; | ||
346 | } | ||
347 | |||
348 | cfag12864b_buffer = (unsigned char *) __get_free_page(GFP_KERNEL); | ||
349 | if (cfag12864b_buffer == NULL) { | 342 | if (cfag12864b_buffer == NULL) { |
350 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " | 343 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " |
351 | "can't get a free page\n"); | 344 | "can't get a free page\n"); |
@@ -367,8 +360,6 @@ static int __init cfag12864b_init(void) | |||
367 | if (cfag12864b_workqueue == NULL) | 360 | if (cfag12864b_workqueue == NULL) |
368 | goto cachealloced; | 361 | goto cachealloced; |
369 | 362 | ||
370 | memset(cfag12864b_buffer, 0, CFAG12864B_SIZE); | ||
371 | |||
372 | cfag12864b_clear(); | 363 | cfag12864b_clear(); |
373 | cfag12864b_on(); | 364 | cfag12864b_on(); |
374 | 365 | ||