diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 22:01:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 22:01:30 -0800 |
commit | 2c9d0960a5ca4ded47926e03ff33edd220c8c31d (patch) | |
tree | 97ae719a8ddb5239d2b3abdebd0982571b490153 /driver | |
parent | 0449fc80aa4f6476f9aba0cd0229025c1f5da35c (diff) | |
download | patches-2c9d0960a5ca4ded47926e03ff33edd220c8c31d.tar.gz |
added bus probe patch series
Diffstat (limited to 'driver')
30 files changed, 1791 insertions, 0 deletions
diff --git a/driver/add-bttv-sub-bus_type-probe-and-remove-methods.patch b/driver/add-bttv-sub-bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..a4cb3f3e72553 --- /dev/null +++ b/driver/add-bttv-sub-bus_type-probe-and-remove-methods.patch @@ -0,0 +1,169 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Fri Jan 6 03:42:47 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, V4L <video4linux-list@redhat.com> +Subject: [CFT 3/3] Add bttv sub bus_type probe and remove methods +Date: Fri, 06 Jan 2006 11:42:03 +0000 +Message-ID: <20060106114059.13.32@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/media/dvb/bt8xx/dvb-bt8xx.c | 23 +++++++++++------------ + drivers/media/video/bttv-gpio.c | 24 ++++++++++++++++++++++-- + drivers/media/video/bttv.h | 2 ++ + drivers/media/video/ir-kbd-gpio.c | 17 ++++++++--------- + 4 files changed, 43 insertions(+), 23 deletions(-) + +--- gregkh-2.6.orig/drivers/media/dvb/bt8xx/dvb-bt8xx.c ++++ gregkh-2.6/drivers/media/dvb/bt8xx/dvb-bt8xx.c +@@ -787,9 +787,8 @@ static int __init dvb_bt8xx_load_card(st + return 0; + } + +-static int dvb_bt8xx_probe(struct device *dev) ++static int dvb_bt8xx_probe(struct bttv_sub_device *sub) + { +- struct bttv_sub_device *sub = to_bttv_sub_dev(dev); + struct dvb_bt8xx_card *card; + struct pci_dev* bttv_pci_dev; + int ret; +@@ -907,13 +906,13 @@ static int dvb_bt8xx_probe(struct device + return ret; + } + +- dev_set_drvdata(dev, card); ++ dev_set_drvdata(&sub->dev, card); + return 0; + } + +-static int dvb_bt8xx_remove(struct device *dev) ++static int dvb_bt8xx_remove(struct bttv_sub_device *sub) + { +- struct dvb_bt8xx_card *card = dev_get_drvdata(dev); ++ struct dvb_bt8xx_card *card = dev_get_drvdata(&sub->dev); + + dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr); + +@@ -936,14 +935,14 @@ static int dvb_bt8xx_remove(struct devic + static struct bttv_sub_driver driver = { + .drv = { + .name = "dvb-bt8xx", +- .probe = dvb_bt8xx_probe, +- .remove = dvb_bt8xx_remove, +- /* FIXME: +- * .shutdown = dvb_bt8xx_shutdown, +- * .suspend = dvb_bt8xx_suspend, +- * .resume = dvb_bt8xx_resume, +- */ + }, ++ .probe = dvb_bt8xx_probe, ++ .remove = dvb_bt8xx_remove, ++ /* FIXME: ++ * .shutdown = dvb_bt8xx_shutdown, ++ * .suspend = dvb_bt8xx_suspend, ++ * .resume = dvb_bt8xx_resume, ++ */ + }; + + static int __init dvb_bt8xx_init(void) +--- gregkh-2.6.orig/drivers/media/video/bttv-gpio.c ++++ gregkh-2.6/drivers/media/video/bttv-gpio.c +@@ -47,9 +47,29 @@ static int bttv_sub_bus_match(struct dev + return 0; + } + ++static int bttv_sub_probe(struct device *dev) ++{ ++ struct bttv_sub_device *sdev = to_bttv_sub_dev(dev); ++ struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver); ++ ++ return sub->probe ? sub->probe(sdev) : -ENODEV; ++} ++ ++static int bttv_sub_remove(struct device *dev) ++{ ++ struct bttv_sub_device *sdev = to_bttv_sub_dev(dev); ++ struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver); ++ ++ if (sub->remove) ++ sub->remove(sdev); ++ return 0; ++} ++ + struct bus_type bttv_sub_bus_type = { +- .name = "bttv-sub", +- .match = &bttv_sub_bus_match, ++ .name = "bttv-sub", ++ .match = &bttv_sub_bus_match, ++ .probe = bttv_sub_probe, ++ .remove = bttv_sub_remove, + }; + EXPORT_SYMBOL(bttv_sub_bus_type); + +--- gregkh-2.6.orig/drivers/media/video/bttv.h ++++ gregkh-2.6/drivers/media/video/bttv.h +@@ -334,6 +334,8 @@ struct bttv_sub_device { + struct bttv_sub_driver { + struct device_driver drv; + char wanted[BUS_ID_SIZE]; ++ int (*probe)(struct bttv_sub_device *sub); ++ void (*remove)(struct bttv_sub_device *sub); + void (*gpio_irq)(struct bttv_sub_device *sub); + int (*any_irq)(struct bttv_sub_device *sub); + }; +--- gregkh-2.6.orig/drivers/media/video/ir-kbd-gpio.c ++++ gregkh-2.6/drivers/media/video/ir-kbd-gpio.c +@@ -319,15 +319,15 @@ module_param(repeat_period, int, 0644); + printk(KERN_DEBUG DEVNAME ": " fmt , ## arg) + + static void ir_irq(struct bttv_sub_device *sub); +-static int ir_probe(struct device *dev); +-static int ir_remove(struct device *dev); ++static int ir_probe(struct bttv_sub_device *sub); ++static int ir_remove(struct bttv_sub_device *sub); + + static struct bttv_sub_driver driver = { + .drv = { + .name = DEVNAME, +- .probe = ir_probe, +- .remove = ir_remove, + }, ++ .probe = ir_probe, ++ .remove = ir_remove, + .gpio_irq = ir_irq, + }; + +@@ -570,9 +570,8 @@ static void ir_rc5_timer_keyup(unsigned + + /* ---------------------------------------------------------------------- */ + +-static int ir_probe(struct device *dev) ++static int ir_probe(struct bttv_sub_device *sub) + { +- struct bttv_sub_device *sub = to_bttv_sub_dev(dev); + struct IR *ir; + struct input_dev *input_dev; + IR_KEYTAB_TYPE *ir_codes = NULL; +@@ -707,7 +706,7 @@ static int ir_probe(struct device *dev) + } + + /* all done */ +- dev_set_drvdata(dev, ir); ++ dev_set_drvdata(&sub->dev, ir); + input_register_device(ir->input); + + /* the remote isn't as bouncy as a keyboard */ +@@ -717,9 +716,9 @@ static int ir_probe(struct device *dev) + return 0; + } + +-static int ir_remove(struct device *dev) ++static int ir_remove(struct bttv_sub_device *sub) + { +- struct IR *ir = dev_get_drvdata(dev); ++ struct IR *ir = dev_get_drvdata(&sub->dev); + + if (ir->polling) { + del_timer(&ir->timer); diff --git a/driver/add-bus_type-probe-remove-shutdown-methods..patch b/driver/add-bus_type-probe-remove-shutdown-methods..patch new file mode 100644 index 0000000000000..d46f6a99a048b --- /dev/null +++ b/driver/add-bus_type-probe-remove-shutdown-methods..patch @@ -0,0 +1,95 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:31:35 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 1/29] Add bus_type probe, remove, shutdown methods. +Date: Thu, 05 Jan 2006 14:29:51 +0000 +Message-ID: <20060105142951.13.01@flint.arm.linux.org.uk> + +Add bus_type probe, remove and shutdown methods to replace the +corresponding methods in struct device_driver. This matches +the way we handle the suspend/resume methods. + +Since the bus methods override the device_driver methods, warn +if a device driver is registered whose methods will not be +called. + +The long-term idea is to remove the device_driver methods entirely. + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/base/dd.c | 12 ++++++++++-- + drivers/base/driver.c | 5 +++++ + drivers/base/power/shutdown.c | 5 ++++- + include/linux/device.h | 3 +++ + 4 files changed, 22 insertions(+), 3 deletions(-) + +--- gregkh-2.6.orig/drivers/base/dd.c ++++ gregkh-2.6/drivers/base/dd.c +@@ -78,7 +78,13 @@ int driver_probe_device(struct device_dr + pr_debug("%s: Matched Device %s with Driver %s\n", + drv->bus->name, dev->bus_id, drv->name); + dev->driver = drv; +- if (drv->probe) { ++ if (dev->bus->probe) { ++ ret = dev->bus->probe(dev); ++ if (ret) { ++ dev->driver = NULL; ++ goto ProbeFailed; ++ } ++ } else if (drv->probe) { + ret = drv->probe(dev); + if (ret) { + dev->driver = NULL; +@@ -203,7 +209,9 @@ static void __device_release_driver(stru + sysfs_remove_link(&dev->kobj, "driver"); + klist_remove(&dev->knode_driver); + +- if (drv->remove) ++ if (dev->bus->remove) ++ dev->bus->remove(dev); ++ else if (drv->remove) + drv->remove(dev); + dev->driver = NULL; + put_driver(drv); +--- gregkh-2.6.orig/drivers/base/driver.c ++++ gregkh-2.6/drivers/base/driver.c +@@ -171,6 +171,11 @@ static void klist_devices_put(struct kli + */ + int driver_register(struct device_driver * drv) + { ++ if ((drv->bus->probe && drv->probe) || ++ (drv->bus->remove && drv->remove) || ++ (drv->bus->shutdown && drv->shutdown)) { ++ printk(KERN_WARNING "Driver '%s' needs updating - please use bus_type methods\n", drv->name); ++ } + klist_init(&drv->klist_devices, klist_devices_get, klist_devices_put); + init_completion(&drv->unloaded); + return bus_add_driver(drv); +--- gregkh-2.6.orig/drivers/base/power/shutdown.c ++++ gregkh-2.6/drivers/base/power/shutdown.c +@@ -40,7 +40,10 @@ void device_shutdown(void) + down_write(&devices_subsys.rwsem); + list_for_each_entry_reverse(dev, &devices_subsys.kset.list, + kobj.entry) { +- if (dev->driver && dev->driver->shutdown) { ++ if (dev->bus && dev->bus->shutdown) { ++ dev_dbg(dev, "shutdown\n"); ++ dev->bus->shutdown(dev); ++ } else if (dev->driver && dev->driver->shutdown) { + dev_dbg(dev, "shutdown\n"); + dev->driver->shutdown(dev); + } +--- gregkh-2.6.orig/include/linux/device.h ++++ gregkh-2.6/include/linux/device.h +@@ -49,6 +49,9 @@ struct bus_type { + int (*match)(struct device * dev, struct device_driver * drv); + int (*uevent)(struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size); ++ int (*probe)(struct device * dev); ++ int (*remove)(struct device * dev); ++ void (*shutdown)(struct device * dev); + int (*suspend)(struct device * dev, pm_message_t state); + int (*resume)(struct device * dev); + }; diff --git a/driver/add-ccwgroup_bus_type-probe-and-remove-methods.patch b/driver/add-ccwgroup_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..ad44ae2dcbd09 --- /dev/null +++ b/driver/add-ccwgroup_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,53 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:43:22 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, S390 <linux-390@vm.marist.edu> +Subject: [CFT 24/29] Add ccwgroup_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:42:09 +0000 +Message-ID: <20060105142951.13.24@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/s390/cio/ccwgroup.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- gregkh-2.6.orig/drivers/s390/cio/ccwgroup.c ++++ gregkh-2.6/drivers/s390/cio/ccwgroup.c +@@ -52,11 +52,7 @@ ccwgroup_uevent (struct device *dev, cha + return 0; + } + +-static struct bus_type ccwgroup_bus_type = { +- .name = "ccwgroup", +- .match = ccwgroup_bus_match, +- .uevent = ccwgroup_uevent, +-}; ++static struct bus_type ccwgroup_bus_type; + + static inline void + __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) +@@ -389,6 +385,14 @@ ccwgroup_remove (struct device *dev) + return 0; + } + ++static struct bus_type ccwgroup_bus_type = { ++ .name = "ccwgroup", ++ .match = ccwgroup_bus_match, ++ .uevent = ccwgroup_uevent, ++ .probe = ccwgroup_probe, ++ .remove = ccwgroup_remove, ++}; ++ + int + ccwgroup_driver_register (struct ccwgroup_driver *cdriver) + { +@@ -396,8 +400,6 @@ ccwgroup_driver_register (struct ccwgrou + cdriver->driver = (struct device_driver) { + .bus = &ccwgroup_bus_type, + .name = cdriver->name, +- .probe = ccwgroup_probe, +- .remove = ccwgroup_remove, + }; + + return driver_register(&cdriver->driver); diff --git a/driver/add-dio_bus_type-probe-and-remove-methods.patch b/driver/add-dio_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..75678a73db761 --- /dev/null +++ b/driver/add-dio_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:42:39 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 15/29] Add dio_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:37:18 +0000 +Message-ID: <20060105142951.13.15@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/dio/dio-driver.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/dio/dio-driver.c ++++ gregkh-2.6/drivers/dio/dio-driver.c +@@ -83,7 +83,6 @@ int dio_register_driver(struct dio_drive + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &dio_bus_type; +- drv->driver.probe = dio_device_probe; + + /* register with core */ + count = driver_register(&drv->driver); +@@ -145,7 +144,8 @@ static int dio_bus_match(struct device * + + struct bus_type dio_bus_type = { + .name = "dio", +- .match = dio_bus_match ++ .match = dio_bus_match, ++ .probe = dio_device_probe, + }; + + diff --git a/driver/add-ecard_bus_type-probe-remove-shutdown-methods.patch b/driver/add-ecard_bus_type-probe-remove-shutdown-methods.patch new file mode 100644 index 0000000000000..6592b8c8ed062 --- /dev/null +++ b/driver/add-ecard_bus_type-probe-remove-shutdown-methods.patch @@ -0,0 +1,51 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:31:53 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 3/29] Add ecard_bus_type probe/remove/shutdown methods +Date: Thu, 05 Jan 2006 14:30:57 +0000 +Message-ID: <20060105142951.13.03@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/arm/kernel/ecard.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- gregkh-2.6.orig/arch/arm/kernel/ecard.c ++++ gregkh-2.6/arch/arm/kernel/ecard.c +@@ -1146,9 +1146,11 @@ static void ecard_drv_shutdown(struct de + struct ecard_driver *drv = ECARD_DRV(dev->driver); + struct ecard_request req; + +- if (drv->shutdown) +- drv->shutdown(ec); +- ecard_release(ec); ++ if (dev->driver) { ++ if (drv->shutdown) ++ drv->shutdown(ec); ++ ecard_release(ec); ++ } + + /* + * If this card has a loader, call the reset handler. +@@ -1163,9 +1165,6 @@ static void ecard_drv_shutdown(struct de + int ecard_register_driver(struct ecard_driver *drv) + { + drv->drv.bus = &ecard_bus_type; +- drv->drv.probe = ecard_drv_probe; +- drv->drv.remove = ecard_drv_remove; +- drv->drv.shutdown = ecard_drv_shutdown; + + return driver_register(&drv->drv); + } +@@ -1194,6 +1193,9 @@ struct bus_type ecard_bus_type = { + .name = "ecard", + .dev_attrs = ecard_dev_attrs, + .match = ecard_match, ++ .probe = ecard_drv_probe, ++ .remove = ecard_drv_remove, ++ .shutdown = ecard_drv_shutdown, + }; + + static int ecard_bus_init(void) diff --git a/driver/add-gameport-bus_type-probe-and-remove-methods.patch b/driver/add-gameport-bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..e37a68978572b --- /dev/null +++ b/driver/add-gameport-bus_type-probe-and-remove-methods.patch @@ -0,0 +1,45 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:42:51 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, INPUT <linux-input@atrey.karlin.mff.cuni.cz> +Subject: [CFT 17/29] Add gameport bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:38:22 +0000 +Message-ID: <20060105142951.13.17@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/input/gameport/gameport.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- gregkh-2.6.orig/drivers/input/gameport/gameport.c ++++ gregkh-2.6/drivers/input/gameport/gameport.c +@@ -50,9 +50,7 @@ static DECLARE_MUTEX(gameport_sem); + + static LIST_HEAD(gameport_list); + +-static struct bus_type gameport_bus = { +- .name = "gameport", +-}; ++static struct bus_type gameport_bus; + + static void gameport_add_port(struct gameport *gameport); + static void gameport_destroy_port(struct gameport *gameport); +@@ -703,11 +701,15 @@ static int gameport_driver_remove(struct + return 0; + } + ++static struct bus_type gameport_bus = { ++ .name = "gameport", ++ .probe = gameport_driver_probe, ++ .remove = gameport_driver_remove, ++}; ++ + void __gameport_register_driver(struct gameport_driver *drv, struct module *owner) + { + drv->driver.bus = &gameport_bus; +- drv->driver.probe = gameport_driver_probe; +- drv->driver.remove = gameport_driver_remove; + gameport_queue_event(drv, owner, GAMEPORT_REGISTER_DRIVER); + } + diff --git a/driver/add-i2c_bus_type-probe-and-remove-methods.patch b/driver/add-i2c_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..a3b736312e432 --- /dev/null +++ b/driver/add-i2c_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,64 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:42:43 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, I2C <lm-sensors@lm-sensors.org> +Subject: [CFT 16/29] Add i2c_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:37:50 +0000 +Message-ID: <20060105142951.13.16@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/i2c/i2c-core.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) + +--- gregkh-2.6.orig/drivers/i2c/i2c-core.c ++++ gregkh-2.6/drivers/i2c/i2c-core.c +@@ -63,13 +63,6 @@ static int i2c_bus_resume(struct device + return rc; + } + +-struct bus_type i2c_bus_type = { +- .name = "i2c", +- .match = i2c_device_match, +- .suspend = i2c_bus_suspend, +- .resume = i2c_bus_resume, +-}; +- + static int i2c_device_probe(struct device *dev) + { + return -ENODEV; +@@ -80,6 +73,15 @@ static int i2c_device_remove(struct devi + return 0; + } + ++struct bus_type i2c_bus_type = { ++ .name = "i2c", ++ .match = i2c_device_match, ++ .probe = i2c_device_probe, ++ .remove = i2c_device_remove, ++ .suspend = i2c_bus_suspend, ++ .resume = i2c_bus_resume, ++}; ++ + void i2c_adapter_dev_release(struct device *dev) + { + struct i2c_adapter *adap = dev_to_i2c_adapter(dev); +@@ -90,8 +92,6 @@ struct device_driver i2c_adapter_driver + .owner = THIS_MODULE, + .name = "i2c_adapter", + .bus = &i2c_bus_type, +- .probe = i2c_device_probe, +- .remove = i2c_device_remove, + }; + + static void i2c_adapter_class_dev_release(struct class_device *dev) +@@ -294,8 +294,6 @@ int i2c_register_driver(struct module *o + /* add the driver to the list of i2c drivers in the driver core */ + driver->driver.owner = owner; + driver->driver.bus = &i2c_bus_type; +- driver->driver.probe = i2c_device_probe; +- driver->driver.remove = i2c_device_remove; + + res = driver_register(&driver->driver); + if (res) diff --git a/driver/add-ide_bus_type-probe-and-remove-methods.patch b/driver/add-ide_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..4409592490851 --- /dev/null +++ b/driver/add-ide_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,323 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Fri Jan 6 03:42:40 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, IDE <linux-ide@vger.kernel.org> +Subject: [CFT 1/3] Add ide_bus_type probe and remove methods +Date: Fri, 06 Jan 2006 11:41:00 +0000 +Message-ID: <20060106114059.13.30@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/ide/ide-cd.c | 14 +++++--------- + drivers/ide/ide-disk.c | 22 ++++++++-------------- + drivers/ide/ide-floppy.c | 14 +++++--------- + drivers/ide/ide-tape.c | 18 +++++++----------- + drivers/ide/ide.c | 31 +++++++++++++++++++++++++++++++ + include/linux/ide.h | 5 +++++ + 6 files changed, 61 insertions(+), 43 deletions(-) + +--- gregkh-2.6.orig/drivers/ide/ide-cd.c ++++ gregkh-2.6/drivers/ide/ide-cd.c +@@ -3264,9 +3264,8 @@ sector_t ide_cdrom_capacity (ide_drive_t + } + #endif + +-static int ide_cd_remove(struct device *dev) ++static void ide_cd_remove(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + struct cdrom_info *info = drive->driver_data; + + ide_unregister_subdriver(drive, info->driver); +@@ -3274,8 +3273,6 @@ static int ide_cd_remove(struct device * + del_gendisk(info->disk); + + ide_cd_put(info); +- +- return 0; + } + + static void ide_cd_release(struct kref *kref) +@@ -3299,7 +3296,7 @@ static void ide_cd_release(struct kref * + kfree(info); + } + +-static int ide_cd_probe(struct device *); ++static int ide_cd_probe(ide_drive_t *); + + #ifdef CONFIG_PROC_FS + static int proc_idecd_read_capacity +@@ -3325,9 +3322,9 @@ static ide_driver_t ide_cdrom_driver = { + .owner = THIS_MODULE, + .name = "ide-cdrom", + .bus = &ide_bus_type, +- .probe = ide_cd_probe, +- .remove = ide_cd_remove, + }, ++ .probe = ide_cd_probe, ++ .remove = ide_cd_remove, + .version = IDECD_VERSION, + .media = ide_cdrom, + .supports_dsc_overlap = 1, +@@ -3421,9 +3418,8 @@ static char *ignore = NULL; + module_param(ignore, charp, 0400); + MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); + +-static int ide_cd_probe(struct device *dev) ++static int ide_cd_probe(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + struct cdrom_info *info; + struct gendisk *g; + struct request_sense sense; +--- gregkh-2.6.orig/drivers/ide/ide-disk.c ++++ gregkh-2.6/drivers/ide/ide-disk.c +@@ -997,9 +997,8 @@ static void ide_cacheflush_p(ide_drive_t + printk(KERN_INFO "%s: wcache flush failed!\n", drive->name); + } + +-static int ide_disk_remove(struct device *dev) ++static void ide_disk_remove(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + struct ide_disk_obj *idkp = drive->driver_data; + struct gendisk *g = idkp->disk; + +@@ -1010,8 +1009,6 @@ static int ide_disk_remove(struct device + ide_cacheflush_p(drive); + + ide_disk_put(idkp); +- +- return 0; + } + + static void ide_disk_release(struct kref *kref) +@@ -1027,12 +1024,10 @@ static void ide_disk_release(struct kref + kfree(idkp); + } + +-static int ide_disk_probe(struct device *dev); ++static int ide_disk_probe(ide_drive_t *drive); + +-static void ide_device_shutdown(struct device *dev) ++static void ide_device_shutdown(ide_drive_t *drive) + { +- ide_drive_t *drive = container_of(dev, ide_drive_t, gendev); +- + #ifdef CONFIG_ALPHA + /* On Alpha, halt(8) doesn't actually turn the machine off, + it puts you into the sort of firmware monitor. Typically, +@@ -1054,7 +1049,7 @@ static void ide_device_shutdown(struct d + } + + printk("Shutdown: %s\n", drive->name); +- dev->bus->suspend(dev, PMSG_SUSPEND); ++ drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND); + } + + static ide_driver_t idedisk_driver = { +@@ -1062,10 +1057,10 @@ static ide_driver_t idedisk_driver = { + .owner = THIS_MODULE, + .name = "ide-disk", + .bus = &ide_bus_type, +- .probe = ide_disk_probe, +- .remove = ide_disk_remove, +- .shutdown = ide_device_shutdown, + }, ++ .probe = ide_disk_probe, ++ .remove = ide_disk_remove, ++ .shutdown = ide_device_shutdown, + .version = IDEDISK_VERSION, + .media = ide_disk, + .supports_dsc_overlap = 0, +@@ -1182,9 +1177,8 @@ static struct block_device_operations id + + MODULE_DESCRIPTION("ATA DISK Driver"); + +-static int ide_disk_probe(struct device *dev) ++static int ide_disk_probe(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + struct ide_disk_obj *idkp; + struct gendisk *g; + +--- gregkh-2.6.orig/drivers/ide/ide-floppy.c ++++ gregkh-2.6/drivers/ide/ide-floppy.c +@@ -1871,9 +1871,8 @@ static void idefloppy_setup (ide_drive_t + idefloppy_add_settings(drive); + } + +-static int ide_floppy_remove(struct device *dev) ++static void ide_floppy_remove(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + idefloppy_floppy_t *floppy = drive->driver_data; + struct gendisk *g = floppy->disk; + +@@ -1882,8 +1881,6 @@ static int ide_floppy_remove(struct devi + del_gendisk(g); + + ide_floppy_put(floppy); +- +- return 0; + } + + static void ide_floppy_release(struct kref *kref) +@@ -1922,16 +1919,16 @@ static ide_proc_entry_t idefloppy_proc[] + + #endif /* CONFIG_PROC_FS */ + +-static int ide_floppy_probe(struct device *); ++static int ide_floppy_probe(ide_drive_t *); + + static ide_driver_t idefloppy_driver = { + .gen_driver = { + .owner = THIS_MODULE, + .name = "ide-floppy", + .bus = &ide_bus_type, +- .probe = ide_floppy_probe, +- .remove = ide_floppy_remove, + }, ++ .probe = ide_floppy_probe, ++ .remove = ide_floppy_remove, + .version = IDEFLOPPY_VERSION, + .media = ide_floppy, + .supports_dsc_overlap = 0, +@@ -2136,9 +2133,8 @@ static struct block_device_operations id + .revalidate_disk= idefloppy_revalidate_disk + }; + +-static int ide_floppy_probe(struct device *dev) ++static int ide_floppy_probe(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + idefloppy_floppy_t *floppy; + struct gendisk *g; + +--- gregkh-2.6.orig/drivers/ide/ide-tape.c ++++ gregkh-2.6/drivers/ide/ide-tape.c +@@ -4682,9 +4682,8 @@ static void idetape_setup (ide_drive_t * + idetape_add_settings(drive); + } + +-static int ide_tape_remove(struct device *dev) ++static void ide_tape_remove(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + idetape_tape_t *tape = drive->driver_data; + + ide_unregister_subdriver(drive, tape->driver); +@@ -4692,8 +4691,6 @@ static int ide_tape_remove(struct device + ide_unregister_region(tape->disk); + + ide_tape_put(tape); +- +- return 0; + } + + static void ide_tape_release(struct kref *kref) +@@ -4745,16 +4742,16 @@ static ide_proc_entry_t idetape_proc[] = + + #endif + +-static int ide_tape_probe(struct device *); ++static int ide_tape_probe(ide_drive_t *); + + static ide_driver_t idetape_driver = { + .gen_driver = { + .owner = THIS_MODULE, + .name = "ide-tape", + .bus = &ide_bus_type, +- .probe = ide_tape_probe, +- .remove = ide_tape_remove, + }, ++ .probe = ide_tape_probe, ++ .remove = ide_tape_remove, + .version = IDETAPE_VERSION, + .media = ide_tape, + .supports_dsc_overlap = 1, +@@ -4825,9 +4822,8 @@ static struct block_device_operations id + .ioctl = idetape_ioctl, + }; + +-static int ide_tape_probe(struct device *dev) ++static int ide_tape_probe(ide_drive_t *drive) + { +- ide_drive_t *drive = to_ide_device(dev); + idetape_tape_t *tape; + struct gendisk *g; + int minor; +@@ -4883,9 +4879,9 @@ static int ide_tape_probe(struct device + idetape_setup(drive, tape, minor); + + class_device_create(idetape_sysfs_class, NULL, +- MKDEV(IDETAPE_MAJOR, minor), dev, "%s", tape->name); ++ MKDEV(IDETAPE_MAJOR, minor), &drive->gendev, "%s", tape->name); + class_device_create(idetape_sysfs_class, NULL, +- MKDEV(IDETAPE_MAJOR, minor + 128), dev, "n%s", tape->name); ++ MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); + + devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), + S_IFCHR | S_IRUGO | S_IWUGO, +--- gregkh-2.6.orig/drivers/ide/ide.c ++++ gregkh-2.6/drivers/ide/ide.c +@@ -1949,10 +1949,41 @@ static int ide_uevent(struct device *dev + return 0; + } + ++static int generic_ide_probe(struct device *dev) ++{ ++ ide_drive_t *drive = to_ide_device(dev); ++ ide_driver_t *drv = to_ide_driver(dev->driver); ++ ++ return drv->probe ? drv->probe(drive) : -ENODEV; ++} ++ ++static int generic_ide_remove(struct device *dev) ++{ ++ ide_drive_t *drive = to_ide_device(dev); ++ ide_driver_t *drv = to_ide_driver(dev->driver); ++ ++ if (drv->remove) ++ drv->remove(drive); ++ ++ return 0; ++} ++ ++static void generic_ide_shutdown(struct device *dev) ++{ ++ ide_drive_t *drive = to_ide_device(dev); ++ ide_driver_t *drv = to_ide_driver(dev->driver); ++ ++ if (dev->driver && drv->shutdown) ++ drv->shutdown(drive); ++} ++ + struct bus_type ide_bus_type = { + .name = "ide", + .match = ide_bus_match, + .uevent = ide_uevent, ++ .probe = generic_ide_probe, ++ .remove = generic_ide_remove, ++ .shutdown = generic_ide_shutdown, + .dev_attrs = ide_dev_attrs, + .suspend = generic_ide_suspend, + .resume = generic_ide_resume, +--- gregkh-2.6.orig/include/linux/ide.h ++++ gregkh-2.6/include/linux/ide.h +@@ -982,8 +982,13 @@ typedef struct ide_driver_s { + ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); + ide_proc_entry_t *proc; + struct device_driver gen_driver; ++ int (*probe)(ide_drive_t *); ++ void (*remove)(ide_drive_t *); ++ void (*shutdown)(ide_drive_t *); + } ide_driver_t; + ++#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) ++ + int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); + + /* diff --git a/driver/add-locomo-bus_type-probe-remove-methods.patch b/driver/add-locomo-bus_type-probe-remove-methods.patch new file mode 100644 index 0000000000000..53cee7d77c21e --- /dev/null +++ b/driver/add-locomo-bus_type-probe-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:08 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, Richard Purdie <rpurdie@rpsys.net> +Subject: [CFT 7/29] Add locomo bus_type probe/remove methods +Date: Thu, 05 Jan 2006 14:33:04 +0000 +Message-ID: <20060105142951.13.07@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Richard Purdie <rpurdie@rpsys.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/arm/common/locomo.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/arm/common/locomo.c ++++ gregkh-2.6/arch/arm/common/locomo.c +@@ -1103,14 +1103,14 @@ static int locomo_bus_remove(struct devi + struct bus_type locomo_bus_type = { + .name = "locomo-bus", + .match = locomo_match, ++ .probe = locomo_bus_probe, ++ .remove = locomo_bus_remove, + .suspend = locomo_bus_suspend, + .resume = locomo_bus_resume, + }; + + int locomo_driver_register(struct locomo_driver *driver) + { +- driver->drv.probe = locomo_bus_probe; +- driver->drv.remove = locomo_bus_remove; + driver->drv.bus = &locomo_bus_type; + return driver_register(&driver->drv); + } diff --git a/driver/add-logic-module-bus_type-probe-remove-methods.patch b/driver/add-logic-module-bus_type-probe-remove-methods.patch new file mode 100644 index 0000000000000..40422071dc36b --- /dev/null +++ b/driver/add-logic-module-bus_type-probe-remove-methods.patch @@ -0,0 +1,72 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:10 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 8/29] Add logic module bus_type probe/remove methods +Date: Thu, 05 Jan 2006 14:33:35 +0000 +Message-ID: <20060105142951.13.08@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/arm/mach-integrator/lm.c | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +--- gregkh-2.6.orig/arch/arm/mach-integrator/lm.c ++++ gregkh-2.6/arch/arm/mach-integrator/lm.c +@@ -22,20 +22,6 @@ static int lm_match(struct device *dev, + return 1; + } + +-static struct bus_type lm_bustype = { +- .name = "logicmodule", +- .match = lm_match, +-// .suspend = lm_suspend, +-// .resume = lm_resume, +-}; +- +-static int __init lm_init(void) +-{ +- return bus_register(&lm_bustype); +-} +- +-postcore_initcall(lm_init); +- + static int lm_bus_probe(struct device *dev) + { + struct lm_device *lmdev = to_lm_device(dev); +@@ -49,16 +35,30 @@ static int lm_bus_remove(struct device * + struct lm_device *lmdev = to_lm_device(dev); + struct lm_driver *lmdrv = to_lm_driver(dev->driver); + +- lmdrv->remove(lmdev); ++ if (lmdrv->remove) ++ lmdrv->remove(lmdev); + return 0; + } + ++static struct bus_type lm_bustype = { ++ .name = "logicmodule", ++ .match = lm_match, ++ .probe = lm_bus_probe, ++ .remove = lm_bus_remove, ++// .suspend = lm_bus_suspend, ++// .resume = lm_bus_resume, ++}; ++ ++static int __init lm_init(void) ++{ ++ return bus_register(&lm_bustype); ++} ++ ++postcore_initcall(lm_init); ++ + int lm_driver_register(struct lm_driver *drv) + { + drv->drv.bus = &lm_bustype; +- drv->drv.probe = lm_bus_probe; +- drv->drv.remove = lm_bus_remove; +- + return driver_register(&drv->drv); + } + diff --git a/driver/add-macio_bus_type-probe-and-remove-methods.patch b/driver/add-macio_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..c953d04e6d062 --- /dev/null +++ b/driver/add-macio_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,36 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:42:59 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, MAC <linuxppc-dev@ozlabs.org> +Subject: [CFT 19/29] Add macio_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:39:24 +0000 +Message-ID: <20060105142951.13.19@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/macintosh/macio_asic.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- gregkh-2.6.orig/drivers/macintosh/macio_asic.c ++++ gregkh-2.6/drivers/macintosh/macio_asic.c +@@ -204,6 +204,9 @@ struct bus_type macio_bus_type = { + .name = "macio", + .match = macio_bus_match, + .uevent = macio_uevent, ++ .probe = macio_device_probe, ++ .remove = macio_device_remove, ++ .shutdown = macio_device_shutdown, + .suspend = macio_device_suspend, + .resume = macio_device_resume, + .dev_attrs = macio_dev_attrs, +@@ -487,9 +490,6 @@ int macio_register_driver(struct macio_d + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &macio_bus_type; +- drv->driver.probe = macio_device_probe; +- drv->driver.remove = macio_device_remove; +- drv->driver.shutdown = macio_device_shutdown; + + /* register with core */ + count = driver_register(&drv->driver); diff --git a/driver/add-mcp-bus_type-probe-and-remove-methods.patch b/driver/add-mcp-bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..4e41bc94e83c8 --- /dev/null +++ b/driver/add-mcp-bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:43:06 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 20/29] Add MCP bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:39:56 +0000 +Message-ID: <20060105142951.13.20@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/mfd/mcp-core.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/mfd/mcp-core.c ++++ gregkh-2.6/drivers/mfd/mcp-core.c +@@ -77,6 +77,8 @@ static int mcp_bus_resume(struct device + static struct bus_type mcp_bus_type = { + .name = "mcp", + .match = mcp_bus_match, ++ .probe = mcp_bus_probe, ++ .remove = mcp_bus_remove, + .suspend = mcp_bus_suspend, + .resume = mcp_bus_resume, + }; +@@ -227,8 +229,6 @@ EXPORT_SYMBOL(mcp_host_unregister); + int mcp_driver_register(struct mcp_driver *mcpdrv) + { + mcpdrv->drv.bus = &mcp_bus_type; +- mcpdrv->drv.probe = mcp_bus_probe; +- mcpdrv->drv.remove = mcp_bus_remove; + return driver_register(&mcpdrv->drv); + } + EXPORT_SYMBOL(mcp_driver_register); diff --git a/driver/add-mmc_bus_type-probe-and-remove-methods.patch b/driver/add-mmc_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..ac9575da92393 --- /dev/null +++ b/driver/add-mmc_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,70 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:43:10 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 21/29] Add mmc_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:40:27 +0000 +Message-ID: <20060105142951.13.21@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/mmc/mmc_sysfs.c | 26 ++++++++++++-------------- + 1 file changed, 12 insertions(+), 14 deletions(-) + +--- gregkh-2.6.orig/drivers/mmc/mmc_sysfs.c ++++ gregkh-2.6/drivers/mmc/mmc_sysfs.c +@@ -136,17 +136,7 @@ static int mmc_bus_resume(struct device + return ret; + } + +-static struct bus_type mmc_bus_type = { +- .name = "mmc", +- .dev_attrs = mmc_dev_attrs, +- .match = mmc_bus_match, +- .uevent = mmc_bus_uevent, +- .suspend = mmc_bus_suspend, +- .resume = mmc_bus_resume, +-}; +- +- +-static int mmc_drv_probe(struct device *dev) ++static int mmc_bus_probe(struct device *dev) + { + struct mmc_driver *drv = to_mmc_driver(dev->driver); + struct mmc_card *card = dev_to_mmc_card(dev); +@@ -154,7 +144,7 @@ static int mmc_drv_probe(struct device * + return drv->probe(card); + } + +-static int mmc_drv_remove(struct device *dev) ++static int mmc_bus_remove(struct device *dev) + { + struct mmc_driver *drv = to_mmc_driver(dev->driver); + struct mmc_card *card = dev_to_mmc_card(dev); +@@ -164,6 +154,16 @@ static int mmc_drv_remove(struct device + return 0; + } + ++static struct bus_type mmc_bus_type = { ++ .name = "mmc", ++ .dev_attrs = mmc_dev_attrs, ++ .match = mmc_bus_match, ++ .uevent = mmc_bus_uevent, ++ .probe = mmc_bus_probe, ++ .remove = mmc_bus_remove, ++ .suspend = mmc_bus_suspend, ++ .resume = mmc_bus_resume, ++}; + + /** + * mmc_register_driver - register a media driver +@@ -172,8 +172,6 @@ static int mmc_drv_remove(struct device + int mmc_register_driver(struct mmc_driver *drv) + { + drv->drv.bus = &mmc_bus_type; +- drv->drv.probe = mmc_drv_probe; +- drv->drv.remove = mmc_drv_remove; + return driver_register(&drv->drv); + } + diff --git a/driver/add-ocp_bus_type-probe-and-remove-methods.patch b/driver/add-ocp_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..4a86bfa2751a0 --- /dev/null +++ b/driver/add-ocp_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:18 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, Matt Porter <mporter@kernel.crashing.org> +Subject: [CFT 11/29] Add ocp_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:35:09 +0000 +Message-ID: <20060105142951.13.11@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/ppc/syslib/ocp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/ppc/syslib/ocp.c ++++ gregkh-2.6/arch/ppc/syslib/ocp.c +@@ -189,6 +189,8 @@ ocp_device_resume(struct device *dev) + struct bus_type ocp_bus_type = { + .name = "ocp", + .match = ocp_device_match, ++ .probe = ocp_driver_probe, ++ .remove = ocp_driver_remove, + .suspend = ocp_device_suspend, + .resume = ocp_device_resume, + }; +@@ -210,8 +212,6 @@ ocp_register_driver(struct ocp_driver *d + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &ocp_bus_type; +- drv->driver.probe = ocp_device_probe; +- drv->driver.remove = ocp_device_remove; + + /* register with core */ + return driver_register(&drv->driver); diff --git a/driver/add-of_platform_bus_type-probe-and-remove-methods.patch b/driver/add-of_platform_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..8ce5ece8285bf --- /dev/null +++ b/driver/add-of_platform_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:22 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, PowerPC <linuxppc-embedded@ozlabs.org> +Subject: [CFT 13/29] Add of_platform_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:36:16 +0000 +Message-ID: <20060105142951.13.13@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/powerpc/kernel/of_device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/powerpc/kernel/of_device.c ++++ gregkh-2.6/arch/powerpc/kernel/of_device.c +@@ -132,6 +132,8 @@ static int of_device_resume(struct devic + struct bus_type of_platform_bus_type = { + .name = "of_platform", + .match = of_platform_bus_match, ++ .probe = of_device_probe, ++ .remove = of_device_remove, + .suspend = of_device_suspend, + .resume = of_device_resume, + }; +@@ -150,8 +152,6 @@ int of_register_driver(struct of_platfor + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &of_platform_bus_type; +- drv->driver.probe = of_device_probe; +- drv->driver.remove = of_device_remove; + + /* register with core */ + count = driver_register(&drv->driver); diff --git a/driver/add-parisc_bus_type-probe-and-remove-methods.patch b/driver/add-parisc_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..2e98e98b57d83 --- /dev/null +++ b/driver/add-parisc_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,35 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:17 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, parisc <parisc-linux@parisc-linux.org> +Subject: [CFT 10/29] Add parisc_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:34:38 +0000 +Message-ID: <20060105142951.13.10@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Acked-by: Matthew Wilcox <matthew@wil.cx> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/parisc/kernel/drivers.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/parisc/kernel/drivers.c ++++ gregkh-2.6/arch/parisc/kernel/drivers.c +@@ -173,8 +173,6 @@ int register_parisc_driver(struct parisc + WARN_ON(driver->drv.probe != NULL); + WARN_ON(driver->drv.remove != NULL); + +- driver->drv.probe = parisc_driver_probe; +- driver->drv.remove = parisc_driver_remove; + driver->drv.name = driver->name; + + return driver_register(&driver->drv); +@@ -570,6 +568,8 @@ struct bus_type parisc_bus_type = { + .name = "parisc", + .match = parisc_generic_match, + .dev_attrs = parisc_device_attrs, ++ .probe = parisc_driver_probe, ++ .remove = parisc_driver_remove, + }; + + /** diff --git a/driver/add-pci_bus_type-probe-and-remove-methods.patch b/driver/add-pci_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..6caa333779bfa --- /dev/null +++ b/driver/add-pci_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,38 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:31:48 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 2/29] Add pci_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:30:22 +0000 +Message-ID: <20060105142951.13.02@flint.arm.linux.org.uk> + +Move the PCI bus device probe/remove methods to the bus_type +structure. We leave the shutdown method alone since there +are compatibility issues with that. + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/pci-driver.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/pci-driver.c ++++ gregkh-2.6/drivers/pci/pci-driver.c +@@ -380,8 +380,6 @@ int __pci_register_driver(struct pci_dri + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &pci_bus_type; +- drv->driver.probe = pci_device_probe; +- drv->driver.remove = pci_device_remove; + /* FIXME, once all of the existing PCI drivers have been fixed to set + * the pci shutdown function, this test can go away. */ + if (!drv->driver.shutdown) +@@ -513,6 +511,8 @@ struct bus_type pci_bus_type = { + .name = "pci", + .match = pci_bus_match, + .uevent = pci_uevent, ++ .probe = pci_device_probe, ++ .remove = pci_device_remove, + .suspend = pci_device_suspend, + .resume = pci_device_resume, + .dev_attrs = pci_dev_attrs, diff --git a/driver/add-pcmcia_bus_type-probe-and-remove-methods.patch b/driver/add-pcmcia_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..3b624fe8e514e --- /dev/null +++ b/driver/add-pcmcia_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:43:14 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, PCMCIA <linux-pcmcia@lists.infradead.org> +Subject: [CFT 22/29] Add pcmcia_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:40:58 +0000 +Message-ID: <20060105142951.13.22@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pcmcia/ds.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pcmcia/ds.c ++++ gregkh-2.6/drivers/pcmcia/ds.c +@@ -311,8 +311,6 @@ int pcmcia_register_driver(struct pcmcia + /* initialize common fields */ + driver->drv.bus = &pcmcia_bus_type; + driver->drv.owner = driver->owner; +- driver->drv.probe = pcmcia_device_probe; +- driver->drv.remove = pcmcia_device_remove; + + return driver_register(&driver->drv); + } +@@ -1167,6 +1165,8 @@ struct bus_type pcmcia_bus_type = { + .uevent = pcmcia_bus_uevent, + .match = pcmcia_bus_match, + .dev_attrs = pcmcia_dev_attrs, ++ .probe = pcmcia_device_probe, ++ .remove = pcmcia_device_remove, + .suspend = pcmcia_dev_suspend, + .resume = pcmcia_dev_resume, + }; diff --git a/driver/add-pnp_bus_type-probe-and-remove-methods.patch b/driver/add-pnp_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..c2b9ce6d1e4d0 --- /dev/null +++ b/driver/add-pnp_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:43:18 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, Adam Belay <ambx1@neo.rr.com> +Subject: [CFT 23/29] Add pnp_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:41:37 +0000 +Message-ID: <20060105142951.13.23@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pnp/driver.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pnp/driver.c ++++ gregkh-2.6/drivers/pnp/driver.c +@@ -195,6 +195,8 @@ static int pnp_bus_resume(struct device + struct bus_type pnp_bus_type = { + .name = "pnp", + .match = pnp_bus_match, ++ .probe = pnp_device_probe, ++ .remove = pnp_device_remove, + .suspend = pnp_bus_suspend, + .resume = pnp_bus_resume, + }; +@@ -215,8 +217,6 @@ int pnp_register_driver(struct pnp_drive + + drv->driver.name = drv->name; + drv->driver.bus = &pnp_bus_type; +- drv->driver.probe = pnp_device_probe; +- drv->driver.remove = pnp_device_remove; + + count = driver_register(&drv->driver); + diff --git a/driver/add-pseudo-lld-bus_type-probe-and-remove-methods.patch b/driver/add-pseudo-lld-bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..7261b561f3bb6 --- /dev/null +++ b/driver/add-pseudo-lld-bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:49:11 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, SCSI <linux-scsi@vger.kernel.org> +Subject: [CFT 29/29] Add Pseudo LLD bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:44:46 +0000 +Message-ID: <20060105142951.13.29@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/scsi_debug.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/scsi/scsi_debug.c ++++ gregkh-2.6/drivers/scsi/scsi_debug.c +@@ -221,8 +221,6 @@ static struct bus_type pseudo_lld_bus; + static struct device_driver sdebug_driverfs_driver = { + .name = sdebug_proc_name, + .bus = &pseudo_lld_bus, +- .probe = sdebug_driver_probe, +- .remove = sdebug_driver_remove, + }; + + static const int check_condition_result = +@@ -1796,6 +1794,8 @@ static int pseudo_lld_bus_match(struct d + static struct bus_type pseudo_lld_bus = { + .name = "pseudo", + .match = pseudo_lld_bus_match, ++ .probe = sdebug_driver_probe, ++ .remove = sdebug_driver_remove, + }; + + static void sdebug_release_adapter(struct device * dev) diff --git a/driver/add-rio_bus_type-probe-and-remove-methods.patch b/driver/add-rio_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..d1c7482cf487c --- /dev/null +++ b/driver/add-rio_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,36 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:49:03 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, Matt Porter <mporter@kernel.crashing.org> +Subject: [CFT 28/29] Add rio_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:44:14 +0000 +Message-ID: <20060105142951.13.28@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/rapidio/rio-driver.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- gregkh-2.6.orig/drivers/rapidio/rio-driver.c ++++ gregkh-2.6/drivers/rapidio/rio-driver.c +@@ -147,8 +147,6 @@ int rio_register_driver(struct rio_drive + /* initialize common driver fields */ + rdrv->driver.name = rdrv->name; + rdrv->driver.bus = &rio_bus_type; +- rdrv->driver.probe = rio_device_probe; +- rdrv->driver.remove = rio_device_remove; + + /* register with core */ + return driver_register(&rdrv->driver); +@@ -204,7 +202,9 @@ static struct device rio_bus = { + struct bus_type rio_bus_type = { + .name = "rapidio", + .match = rio_match_bus, +- .dev_attrs = rio_dev_attrs ++ .dev_attrs = rio_dev_attrs, ++ .probe = rio_device_probe, ++ .remove = rio_device_remove, + }; + + /** diff --git a/driver/add-sa1111-bus_type-probe-remove-methods.patch b/driver/add-sa1111-bus_type-probe-remove-methods.patch new file mode 100644 index 0000000000000..9ac3627d40783 --- /dev/null +++ b/driver/add-sa1111-bus_type-probe-remove-methods.patch @@ -0,0 +1,33 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:05 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 6/29] Add SA1111 bus_type probe/remove methods +Date: Thu, 05 Jan 2006 14:32:32 +0000 +Message-ID: <20060105142951.13.06@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/arm/common/sa1111.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/arm/common/sa1111.c ++++ gregkh-2.6/arch/arm/common/sa1111.c +@@ -1247,14 +1247,14 @@ static int sa1111_bus_remove(struct devi + struct bus_type sa1111_bus_type = { + .name = "sa1111-rab", + .match = sa1111_match, ++ .probe = sa1111_bus_probe, ++ .remove = sa1111_bus_remove, + .suspend = sa1111_bus_suspend, + .resume = sa1111_bus_resume, + }; + + int sa1111_driver_register(struct sa1111_driver *driver) + { +- driver->drv.probe = sa1111_bus_probe; +- driver->drv.remove = sa1111_bus_remove; + driver->drv.bus = &sa1111_bus_type; + return driver_register(&driver->drv); + } diff --git a/driver/add-serio-bus_type-probe-and-remove-methods.patch b/driver/add-serio-bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..9206eb4640b2a --- /dev/null +++ b/driver/add-serio-bus_type-probe-and-remove-methods.patch @@ -0,0 +1,45 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:42:55 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, INPUT <linux-input@atrey.karlin.mff.cuni.cz> +Subject: [CFT 18/29] Add serio bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:38:53 +0000 +Message-ID: <20060105142951.13.18@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/input/serio/serio.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- gregkh-2.6.orig/drivers/input/serio/serio.c ++++ gregkh-2.6/drivers/input/serio/serio.c +@@ -59,9 +59,7 @@ static DECLARE_MUTEX(serio_sem); + + static LIST_HEAD(serio_list); + +-static struct bus_type serio_bus = { +- .name = "serio", +-}; ++static struct bus_type serio_bus; + + static void serio_add_port(struct serio *serio); + static void serio_destroy_port(struct serio *serio); +@@ -750,11 +748,15 @@ static int serio_driver_remove(struct de + return 0; + } + ++static struct bus_type serio_bus = { ++ .name = "serio", ++ .probe = serio_driver_probe, ++ .remove = serio_driver_remove, ++}; ++ + void __serio_register_driver(struct serio_driver *drv, struct module *owner) + { + drv->driver.bus = &serio_bus; +- drv->driver.probe = serio_driver_probe; +- drv->driver.remove = serio_driver_remove; + + serio_queue_event(drv, owner, SERIO_REGISTER_DRIVER); + } diff --git a/driver/add-sh_bus_type-probe-and-remove-methods.patch b/driver/add-sh_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..29ed6b52e624a --- /dev/null +++ b/driver/add-sh_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,71 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:20 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, SH <linux-sh@m17n.org> +Subject: [CFT 12/29] Add sh_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:35:42 +0000 +Message-ID: <20060105142951.13.12@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/sh/kernel/cpu/bus.c | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +--- gregkh-2.6.orig/arch/sh/kernel/cpu/bus.c ++++ gregkh-2.6/arch/sh/kernel/cpu/bus.c +@@ -53,21 +53,6 @@ static int sh_bus_resume(struct device * + return 0; + } + +-static struct device sh_bus_devices[SH_NR_BUSES] = { +- { +- .bus_id = SH_BUS_NAME_VIRT, +- }, +-}; +- +-struct bus_type sh_bus_types[SH_NR_BUSES] = { +- { +- .name = SH_BUS_NAME_VIRT, +- .match = sh_bus_match, +- .suspend = sh_bus_suspend, +- .resume = sh_bus_resume, +- }, +-}; +- + static int sh_device_probe(struct device *dev) + { + struct sh_dev *shdev = to_sh_dev(dev); +@@ -90,6 +75,23 @@ static int sh_device_remove(struct devic + return 0; + } + ++static struct device sh_bus_devices[SH_NR_BUSES] = { ++ { ++ .bus_id = SH_BUS_NAME_VIRT, ++ }, ++}; ++ ++struct bus_type sh_bus_types[SH_NR_BUSES] = { ++ { ++ .name = SH_BUS_NAME_VIRT, ++ .match = sh_bus_match, ++ .probe = sh_bus_probe, ++ .remove = sh_bus_remove, ++ .suspend = sh_bus_suspend, ++ .resume = sh_bus_resume, ++ }, ++}; ++ + int sh_device_register(struct sh_dev *dev) + { + if (!dev) +@@ -133,8 +135,6 @@ int sh_driver_register(struct sh_driver + return -EINVAL; + } + +- drv->drv.probe = sh_device_probe; +- drv->drv.remove = sh_device_remove; + drv->drv.bus = &sh_bus_types[drv->bus_id]; + + return driver_register(&drv->drv); diff --git a/driver/add-superhyway_bus_type-probe-and-remove-methods.patch b/driver/add-superhyway_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..32352aaf98ab1 --- /dev/null +++ b/driver/add-superhyway_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:48:36 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, SH <linux-sh@m17n.org> +Subject: [CFT 25/29] Add superhyway_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:42:40 +0000 +Message-ID: <20060105142951.13.25@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/sh/superhyway/superhyway.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/sh/superhyway/superhyway.c ++++ gregkh-2.6/drivers/sh/superhyway/superhyway.c +@@ -175,8 +175,6 @@ int superhyway_register_driver(struct su + { + drv->drv.name = drv->name; + drv->drv.bus = &superhyway_bus_type; +- drv->drv.probe = superhyway_device_probe; +- drv->drv.remove = superhyway_device_remove; + + return driver_register(&drv->drv); + } +@@ -213,6 +211,8 @@ struct bus_type superhyway_bus_type = { + #ifdef CONFIG_SYSFS + .dev_attrs = superhyway_dev_attrs, + #endif ++ .probe = superhyway_device_probe, ++ .remove = superhyway_device_remove, + }; + + static int __init superhyway_bus_init(void) diff --git a/driver/add-tiocx-bus_type-probe-remove-methods.patch b/driver/add-tiocx-bus_type-probe-remove-methods.patch new file mode 100644 index 0000000000000..3d2baf74d75b8 --- /dev/null +++ b/driver/add-tiocx-bus_type-probe-remove-methods.patch @@ -0,0 +1,53 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:15 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, IA64 <linux-ia64@vger.kernel.org> +Subject: [CFT 9/29] Add tiocx bus_type probe/remove methods +Date: Thu, 05 Jan 2006 14:34:06 +0000 +Message-ID: <20060105142951.13.09@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/ia64/sn/kernel/tiocx.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- gregkh-2.6.orig/arch/ia64/sn/kernel/tiocx.c ++++ gregkh-2.6/arch/ia64/sn/kernel/tiocx.c +@@ -76,12 +76,6 @@ static void tiocx_bus_release(struct dev + kfree(to_cx_dev(dev)); + } + +-struct bus_type tiocx_bus_type = { +- .name = "tiocx", +- .match = tiocx_match, +- .uevent = tiocx_uevent, +-}; +- + /** + * cx_device_match - Find cx_device in the id table. + * @ids: id table from driver +@@ -148,6 +142,14 @@ static int cx_driver_remove(struct devic + return 0; + } + ++struct bus_type tiocx_bus_type = { ++ .name = "tiocx", ++ .match = tiocx_match, ++ .uevent = tiocx_uevent, ++ .probe = cx_device_probe, ++ .remove = cx_device_remove, ++}; ++ + /** + * cx_driver_register - Register the driver. + * @cx_driver: driver table (cx_drv struct) from driver +@@ -161,8 +163,6 @@ int cx_driver_register(struct cx_drv *cx + { + cx_driver->driver.name = cx_driver->name; + cx_driver->driver.bus = &tiocx_bus_type; +- cx_driver->driver.probe = cx_device_probe; +- cx_driver->driver.remove = cx_driver_remove; + + return driver_register(&cx_driver->driver); + } diff --git a/driver/add-usb_serial_bus_type-probe-and-remove-methods.patch b/driver/add-usb_serial_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..761ab2d9ead7f --- /dev/null +++ b/driver/add-usb_serial_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,50 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:48:39 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com> +Subject: [CFT 26/29] Add usb_serial_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:43:11 +0000 +Message-ID: <20060105142951.13.26@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/bus.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/serial/bus.c ++++ gregkh-2.6/drivers/usb/serial/bus.c +@@ -37,11 +37,6 @@ static int usb_serial_device_match (stru + return 0; + } + +-struct bus_type usb_serial_bus_type = { +- .name = "usb-serial", +- .match = usb_serial_device_match, +-}; +- + static int usb_serial_device_probe (struct device *dev) + { + struct usb_serial_driver *driver; +@@ -109,14 +104,18 @@ exit: + return retval; + } + ++struct bus_type usb_serial_bus_type = { ++ .name = "usb-serial", ++ .match = usb_serial_device_match, ++ .probe = usb_serial_device_probe, ++ .remove = usb_serial_device_remove, ++}; ++ + int usb_serial_bus_register(struct usb_serial_driver *driver) + { + int retval; + + driver->driver.bus = &usb_serial_bus_type; +- driver->driver.probe = usb_serial_device_probe; +- driver->driver.remove = usb_serial_device_remove; +- + retval = driver_register(&driver->driver); + + return retval; diff --git a/driver/add-vio_bus_type-probe-and-remove-methods.patch b/driver/add-vio_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..4bbb81bae13ca --- /dev/null +++ b/driver/add-vio_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,43 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:37:30 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, PPC <linuxppc-embedded@ozlabs.org> +Subject: [CFT 14/29] Add vio_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:36:47 +0000 +Message-ID: <20060105142951.13.14@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/powerpc/kernel/vio.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- gregkh-2.6.orig/arch/powerpc/kernel/vio.c ++++ gregkh-2.6/arch/powerpc/kernel/vio.c +@@ -76,7 +76,7 @@ static void vio_bus_shutdown(struct devi + struct vio_dev *viodev = to_vio_dev(dev); + struct vio_driver *viodrv = to_vio_driver(dev->driver); + +- if (viodrv->shutdown) ++ if (dev->driver && viodrv->shutdown) + viodrv->shutdown(viodev); + } + +@@ -91,9 +91,6 @@ int vio_register_driver(struct vio_drive + + /* fill in 'struct driver' fields */ + viodrv->driver.bus = &vio_bus_type; +- viodrv->driver.probe = vio_bus_probe; +- viodrv->driver.remove = vio_bus_remove; +- viodrv->driver.shutdown = vio_bus_shutdown; + + return driver_register(&viodrv->driver); + } +@@ -295,4 +292,7 @@ struct bus_type vio_bus_type = { + .name = "vio", + .uevent = vio_hotplug, + .match = vio_bus_match, ++ .probe = vio_bus_probe, ++ .remove = vio_bus_remove, ++ .shutdown = vio_bus_shutdown, + }; diff --git a/driver/add-zorro_bus_type-probe-and-remove-methods.patch b/driver/add-zorro_bus_type-probe-and-remove-methods.patch new file mode 100644 index 0000000000000..c02d397c36243 --- /dev/null +++ b/driver/add-zorro_bus_type-probe-and-remove-methods.patch @@ -0,0 +1,34 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Thu Jan 5 06:48:59 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, M68K <linux-m68k@lists.linux-m68k.org> +Subject: [CFT 27/29] Add zorro_bus_type probe and remove methods +Date: Thu, 05 Jan 2006 14:43:43 +0000 +Message-ID: <20060105142951.13.27@flint.arm.linux.org.uk> + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/zorro/zorro-driver.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/zorro/zorro-driver.c ++++ gregkh-2.6/drivers/zorro/zorro-driver.c +@@ -77,7 +77,6 @@ int zorro_register_driver(struct zorro_d + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &zorro_bus_type; +- drv->driver.probe = zorro_device_probe; + + /* register with core */ + count = driver_register(&drv->driver); +@@ -132,7 +131,8 @@ static int zorro_bus_match(struct device + + struct bus_type zorro_bus_type = { + .name = "zorro", +- .match = zorro_bus_match ++ .match = zorro_bus_match, ++ .probe = zorro_device_probe, + }; + + diff --git a/driver/remove-usb-gadget-generic-driver-methods.patch b/driver/remove-usb-gadget-generic-driver-methods.patch new file mode 100644 index 0000000000000..0d48fc4e5e6e5 --- /dev/null +++ b/driver/remove-usb-gadget-generic-driver-methods.patch @@ -0,0 +1,69 @@ +From rmk+greg=kroah.com@arm.linux.org.uk Fri Jan 6 03:42:45 2006 +From: Russell King <rmk@arm.linux.org.uk> +CC: Greg K-H <greg@kroah.com>, IDE <linux-usb@vger.kernel.org> +Subject: [CFT 2/3] Remove usb gadget generic driver methods +Date: Fri, 06 Jan 2006 11:41:32 +0000 +Message-ID: <20060106114059.13.31@flint.arm.linux.org.uk> + +USB gadget drivers make no use of these, remove the pointless +comments. + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/gadget/ether.c | 3 --- + drivers/usb/gadget/inode.c | 3 --- + drivers/usb/gadget/serial.c | 3 --- + drivers/usb/gadget/zero.c | 3 --- + 4 files changed, 12 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/gadget/ether.c ++++ gregkh-2.6/drivers/usb/gadget/ether.c +@@ -2534,9 +2534,6 @@ static struct usb_gadget_driver eth_driv + .driver = { + .name = (char *) shortname, + .owner = THIS_MODULE, +- // .shutdown = ... +- // .suspend = ... +- // .resume = ... + }, + }; + +--- gregkh-2.6.orig/drivers/usb/gadget/inode.c ++++ gregkh-2.6/drivers/usb/gadget/inode.c +@@ -1738,9 +1738,6 @@ static struct usb_gadget_driver gadgetfs + + .driver = { + .name = (char *) shortname, +- // .shutdown = ... +- // .suspend = ... +- // .resume = ... + }, + }; + +--- gregkh-2.6.orig/drivers/usb/gadget/serial.c ++++ gregkh-2.6/drivers/usb/gadget/serial.c +@@ -374,9 +374,6 @@ static struct usb_gadget_driver gs_gadge + .disconnect = gs_disconnect, + .driver = { + .name = GS_SHORT_NAME, +- /* .shutdown = ... */ +- /* .suspend = ... */ +- /* .resume = ... */ + }, + }; + +--- gregkh-2.6.orig/drivers/usb/gadget/zero.c ++++ gregkh-2.6/drivers/usb/gadget/zero.c +@@ -1303,9 +1303,6 @@ static struct usb_gadget_driver zero_dri + .driver = { + .name = (char *) shortname, + .owner = THIS_MODULE, +- // .shutdown = ... +- // .suspend = ... +- // .resume = ... + }, + }; + |