X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fauxdisplay%2Fcfag12864b.c;h=eacb175f6bd37a4e5c4314c65a039a1fb04b91d8;hb=fb6813f480806d62361719e84777c8e00d3e86a8;hp=80bb061053877806bc7d6de0256e27b706a18977;hpb=35438c4327df18dbf5e7f597b69299119f4a14de;p=linux-2.6 diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index 80bb061053..eacb175f6b 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c @@ -5,7 +5,7 @@ * License: GPLv2 * Depends: ks0108 * - * Author: Copyright (C) Miguel Ojeda Sandonis + * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 * * This program is free software; you can redistribute it and/or modify @@ -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(); @@ -398,5 +389,5 @@ module_init(cfag12864b_init); module_exit(cfag12864b_exit); MODULE_LICENSE("GPL v2"); -MODULE_AUTHOR("Miguel Ojeda Sandonis "); +MODULE_AUTHOR("Miguel Ojeda Sandonis "); MODULE_DESCRIPTION("cfag12864b LCD driver");