From 887017160c69b5739126990e2dc64617c5f70e15 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 23 Jul 2008 21:31:51 -0700 Subject: [PATCH] --- yaml --- r: 105572 b: refs/heads/master c: b340e8a57ef381e69c99a7a8ede61a6bf71a8014 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/auxdisplay/cfag12864b.c | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 77e3ae9ae475..fb8e692a7aee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5bb49fcd501aa9fd3d321a22b7c01d9b0db7ab36 +refs/heads/master: b340e8a57ef381e69c99a7a8ede61a6bf71a8014 diff --git a/trunk/drivers/auxdisplay/cfag12864b.c b/trunk/drivers/auxdisplay/cfag12864b.c index 683509f013ab..eacb175f6bd3 100644 --- a/trunk/drivers/auxdisplay/cfag12864b.c +++ b/trunk/drivers/auxdisplay/cfag12864b.c @@ -336,16 +336,9 @@ static int __init cfag12864b_init(void) "ks0108 is not initialized\n"); goto none; } + BUILD_BUG_ON(PAGE_SIZE < CFAG12864B_SIZE); - if (PAGE_SIZE < CFAG12864B_SIZE) { - printk(KERN_ERR CFAG12864B_NAME ": ERROR: " - "page size (%i) < cfag12864b size (%i)\n", - (unsigned int)PAGE_SIZE, CFAG12864B_SIZE); - ret = -ENOMEM; - goto none; - } - - cfag12864b_buffer = (unsigned char *) __get_free_page(GFP_KERNEL); + cfag12864b_buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL); if (cfag12864b_buffer == NULL) { printk(KERN_ERR CFAG12864B_NAME ": ERROR: " "can't get a free page\n"); @@ -367,8 +360,6 @@ static int __init cfag12864b_init(void) if (cfag12864b_workqueue == NULL) goto cachealloced; - memset(cfag12864b_buffer, 0, CFAG12864B_SIZE); - cfag12864b_clear(); cfag12864b_on();