hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/macintosh/ans-lcd.c
....@@ -64,7 +64,7 @@
6464 printk(KERN_DEBUG "LCD: write\n");
6565 #endif
6666
67
- if (!access_ok(VERIFY_READ, buf, count))
67
+ if (!access_ok(buf, count))
6868 return -EFAULT;
6969
7070 mutex_lock(&anslcd_mutex);
....@@ -142,12 +142,13 @@
142142 };
143143
144144 static struct miscdevice anslcd_dev = {
145
- ANSLCD_MINOR,
145
+ LCD_MINOR,
146146 "anslcd",
147147 &anslcd_fops
148148 };
149149
150
-const char anslcd_logo[] = "********************" /* Line #1 */
150
+static const char anslcd_logo[] __initconst =
151
+ "********************" /* Line #1 */
151152 "* LINUX! *" /* Line #3 */
152153 "* Welcome to *" /* Line #2 */
153154 "********************"; /* Line #4 */
....@@ -160,7 +161,7 @@
160161 struct device_node* node;
161162
162163 node = of_find_node_by_name(NULL, "lcd");
163
- if (!node || !node->parent || strcmp(node->parent->name, "gc")) {
164
+ if (!node || !of_node_name_eq(node->parent, "gc")) {
164165 of_node_put(node);
165166 return -ENODEV;
166167 }