aboutsummaryrefslogtreecommitdiffstats
path: root/f2.patch
diff options
authorGreg KH <gregkh@t43.kroah.org>2007-12-06 17:37:57 -0800
committerGreg KH <gregkh@t43.kroah.org>2007-12-06 17:37:57 -0800
commit3a06612fafd3d888fa75407c7e277268da20ac68 (patch)
treed8285ab3b9e32270b96965bf6ca330dc44363929 /f2.patch
parent7df893c386a942dcd33521e5f34bc6b8ea20908e (diff)
downloadpatches-3a06612fafd3d888fa75407c7e277268da20ac68.tar.gz
more kobject work in progress...
Diffstat (limited to 'f2.patch')
-rw-r--r--f2.patch95
1 files changed, 77 insertions, 18 deletions
diff --git a/f2.patch b/f2.patch
index 660924f15b2c53..ab8140405c8e9c 100644
--- a/f2.patch
+++ b/f2.patch
@@ -1,18 +1,53 @@
---
- block/elevator.c | 8 ++------
- block/ll_rw_blk.c | 9 +++------
- drivers/base/class.c | 10 +++-------
- drivers/base/core.c | 6 ++----
- drivers/md/md.c | 13 ++++---------
- drivers/net/iseries_veth.c | 10 +++-------
- fs/char_dev.c | 6 ++----
- kernel/module.c | 14 ++++++--------
- kernel/params.c | 6 ++----
- kernel/user.c | 9 ++++-----
- mm/slub.c | 9 ++++-----
- net/bridge/br_if.c | 10 +++-------
- 12 files changed, 38 insertions(+), 72 deletions(-)
+ arch/cris/arch-v32/drivers/iop_fw_load.c | 11 +++++++++++
+ block/elevator.c | 8 ++------
+ block/ll_rw_blk.c | 9 +++------
+ drivers/base/class.c | 10 +++-------
+ drivers/base/core.c | 8 +++-----
+ drivers/md/md.c | 13 ++++---------
+ drivers/net/iseries_veth.c | 17 +++++------------
+ fs/char_dev.c | 6 ++----
+ kernel/module.c | 14 ++++++--------
+ kernel/params.c | 6 ++----
+ kernel/user.c | 9 ++++-----
+ mm/slub.c | 9 ++++-----
+ net/bridge/br_if.c | 10 +++-------
+ 13 files changed, 52 insertions(+), 78 deletions(-)
+--- a/arch/cris/arch-v32/drivers/iop_fw_load.c
++++ b/arch/cris/arch-v32/drivers/iop_fw_load.c
+@@ -20,6 +20,9 @@
+
+ #define IOP_TIMEOUT 100
+
++#error "This driver is broken with regard to its driver core usage."
++#error "Please contact <greg@kroah.com> for details on how to fix it properly."
++
+ static struct device iop_spu_device[2] = {
+ { .bus_id = "iop-spu0", },
+ { .bus_id = "iop-spu1", },
+@@ -192,6 +195,13 @@ int iop_start_mpu(unsigned int start_add
+
+ static int __init iop_fw_load_init(void)
+ {
++#if 0
++ /*
++ * static struct devices can not be added directly to sysfs by ignoring
++ * the driver model infrastructure. To fix this properly, please use
++ * the platform_bus to register these devices to be able to properly
++ * use the firmware infrastructure.
++ */
+ device_initialize(&iop_spu_device[0]);
+ kobject_set_name(&iop_spu_device[0].kobj, "iop-spu0");
+ kobject_add(&iop_spu_device[0].kobj);
+@@ -201,6 +211,7 @@ static int __init iop_fw_load_init(void)
+ device_initialize(&iop_mpu_device);
+ kobject_set_name(&iop_mpu_device.kobj, "iop-mpu");
+ kobject_add(&iop_mpu_device.kobj);
++#endif
+ return 0;
+ }
+
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -185,9 +185,7 @@ static elevator_t *elevator_alloc(struct
@@ -105,6 +140,15 @@
klist_init(&dev->klist_children, klist_children_get,
klist_children_put);
INIT_LIST_HEAD(&dev->dma_pools);
+@@ -778,7 +777,7 @@ static void device_remove_class_symlinks
+ * This is part 2 of device_register(), though may be called
+ * separately _iff_ device_initialize() has been called separately.
+ *
+- * This adds it to the kobject hierarchy via kobject_add(), adds it
++ * This adds it to the kobject hierarchy via kobject_add_ng(), adds it
+ * to the global and sibling lists for the device, then
+ * adds it to the other relevant subsystems of the driver model.
+ */
@@ -806,8 +805,7 @@ int device_add(struct device *dev)
goto Error;
@@ -150,17 +194,20 @@
rdev->saved_raid_disk = -1;
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
-@@ -844,8 +844,7 @@ static int veth_init_connection(u8 rlp)
+@@ -844,11 +844,7 @@ static int veth_init_connection(u8 rlp)
/* This gets us 1 reference, which is held on behalf of the driver
* infrastructure. It's released at module unload. */
- kobject_init(&cnx->kobject);
- cnx->kobject.ktype = &veth_lpar_connection_ktype;
+- rc = kobject_set_name(&cnx->kobject, "cnx%.2d", rlp);
+- if (rc != 0)
+- return rc;
+ kobject_init_ng(&cnx->kobject, &veth_lpar_connection_ktype);
- rc = kobject_set_name(&cnx->kobject, "cnx%.2d", rlp);
- if (rc != 0)
- return rc;
-@@ -1087,11 +1086,8 @@ static struct net_device * __init veth_p
+
+ msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
+ if (! msgs) {
+@@ -1087,11 +1083,8 @@ static struct net_device * __init veth_p
return NULL;
}
@@ -174,6 +221,18 @@
veth_error("Failed adding port for %s to sysfs.\n", dev->name);
veth_info("%s attached to iSeries vlan %d (LPAR map = 0x%.4X)\n",
+@@ -1711,9 +1704,9 @@ static int __init veth_module_init(void)
+ continue;
+
+ kobj = &veth_cnx[i]->kobject;
+- kobj->parent = &veth_driver.driver.kobj;
+ /* If the add failes, complain but otherwise continue */
+- if (0 != kobject_add(kobj))
++ if (0 != kobject_add_ng(kobj, &veth_driver.driver.kobj,
++ "cnx%.2d", veth_cnx[i]->remote_lp))
+ veth_error("cnx %d: Failed adding to sysfs.\n", i);
+ }
+
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -510,9 +510,8 @@ struct cdev *cdev_alloc(void)