diff options
Diffstat (limited to 'drivers/macintosh/ans-lcd.c')
| -rw-r--r-- | drivers/macintosh/ans-lcd.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index 1a57e88a38f7..fa904b24a600 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * /dev/lcd driver for Apple Network Servers. */ @@ -7,13 +8,13 @@ #include <linux/kernel.h> #include <linux/miscdevice.h> #include <linux/fcntl.h> -#include <linux/init.h> +#include <linux/module.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/of.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include <asm/sections.h> -#include <asm/prom.h> #include <asm/io.h> #include "ans-lcd.h" @@ -63,7 +64,7 @@ anslcd_write( struct file * file, const char __user * buf, printk(KERN_DEBUG "LCD: write\n"); #endif - if (!access_ok(VERIFY_READ, buf, count)) + if (!access_ok(buf, count)) return -EFAULT; mutex_lock(&anslcd_mutex); @@ -141,12 +142,13 @@ const struct file_operations anslcd_fops = { }; static struct miscdevice anslcd_dev = { - ANSLCD_MINOR, + LCD_MINOR, "anslcd", &anslcd_fops }; -const char anslcd_logo[] = "********************" /* Line #1 */ +static const char anslcd_logo[] __initconst = + "********************" /* Line #1 */ "* LINUX! *" /* Line #3 */ "* Welcome to *" /* Line #2 */ "********************"; /* Line #4 */ @@ -159,7 +161,7 @@ anslcd_init(void) struct device_node* node; node = of_find_node_by_name(NULL, "lcd"); - if (!node || !node->parent || strcmp(node->parent->name, "gc")) { + if (!node || !of_node_name_eq(node->parent, "gc")) { of_node_put(node); return -ENODEV; } @@ -200,3 +202,4 @@ anslcd_exit(void) module_init(anslcd_init); module_exit(anslcd_exit); +MODULE_LICENSE("GPL v2"); |
