--- linux-2.6.19/drivers/base/core.c +++ linux-2.6.19/drivers/base/core.c @@ -533,7 +533,7 @@ * before it is added to the hierarchy. */ -int device_register(struct device *dev) +int device_register_X(struct device *dev) { device_initialize(dev); return device_add(dev); @@ -677,7 +677,7 @@ EXPORT_SYMBOL_GPL(device_initialize); EXPORT_SYMBOL_GPL(device_add_X); -EXPORT_SYMBOL_GPL(device_register); +EXPORT_SYMBOL_GPL(device_register_X); EXPORT_SYMBOL_GPL(device_del); EXPORT_SYMBOL_GPL(device_unregister); --- linux-2.6.19/include/linux/device.h +++ linux-2.6.19/include/linux/device.h @@ -28,6 +28,7 @@ #define BUS_ID_SIZE KOBJ_NAME_LEN #define device_add(x) ({ printk("device_add_X(): %s:%d @%s\n",__FILE__,__LINE__,__FUNCTION__); device_add_X(x); }) +#define device_register(x) ({ printk("device_register_X(): %s:%d @%s\n",__FILE__,__LINE__,__FUNCTION__); device_register_X(x); }) struct device; struct device_driver; @@ -389,7 +389,7 @@ /* * High level routines for use by the bus drivers */ -extern int __must_check device_register(struct device * dev); +extern int __must_check device_register_X(struct device * dev); extern void device_unregister(struct device * dev); extern void device_initialize(struct device * dev); extern int __must_check device_add_X(struct device * dev);