forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/base/driver.c
....@@ -8,6 +8,7 @@
88 * Copyright (c) 2007 Novell Inc.
99 */
1010
11
+#include <linux/device/driver.h>
1112 #include <linux/device.h>
1213 #include <linux/module.h>
1314 #include <linux/errno.h>
....@@ -73,8 +74,8 @@
7374 * return to the caller and not iterate over any more devices.
7475 */
7576 struct device *driver_find_device(struct device_driver *drv,
76
- struct device *start, void *data,
77
- int (*match)(struct device *dev, void *data))
77
+ struct device *start, const void *data,
78
+ int (*match)(struct device *dev, const void *data))
7879 {
7980 struct klist_iter i;
8081 struct device *dev;
....@@ -157,12 +158,12 @@
157158 if ((drv->bus->probe && drv->probe) ||
158159 (drv->bus->remove && drv->remove) ||
159160 (drv->bus->shutdown && drv->shutdown))
160
- printk(KERN_WARNING "Driver '%s' needs updating - please use "
161
+ pr_warn("Driver '%s' needs updating - please use "
161162 "bus_type methods\n", drv->name);
162163
163164 other = driver_find(drv->name, drv->bus);
164165 if (other) {
165
- printk(KERN_ERR "Error: Driver '%s' is already registered, "
166
+ pr_err("Error: Driver '%s' is already registered, "
166167 "aborting...\n", drv->name);
167168 return -EBUSY;
168169 }