Displaying 4 results from an estimated 4 matches for "kobject_set_name".
2007 Oct 17
0
[PATCH 3/3] sysfs compile fixup
Just use kobject_set_name(), that works in all kernels (I think...).
Kernels newer than 2.6.23 currently fail with:
/home/axboe/git/btrfs/btrfs-unstable/sysfs.c:188: error: unknown field
'name' specified in initializer
diff -r f89e7971692f sysfs.c
--- a/sysfs.c Mon Oct 15 16:22:39 2007 -0400
+++ b/sysfs.c Wed Oct...
2008 Feb 13
2
[PATCH] btrfs: fixes for kobject changes in mainline
...kset btrfs_kset;
+/* /sys/fs/btrfs/ entry */
+static struct kset *btrfs_kset;
int btrfs_sysfs_add_super(struct btrfs_fs_info *fs)
{
@@ -208,14 +209,9 @@
}
name[len] = '\0';
- fs->super_kobj.kset = &btrfs_kset;
- fs->super_kobj.ktype = &btrfs_super_ktype;
-
- error = kobject_set_name(&fs->super_kobj, "%s", name);
- if (error)
- goto fail;
-
- error = kobject_register(&fs->super_kobj);
+ fs->super_kobj.kset = btrfs_kset;
+ error = kobject_init_and_add(&fs->super_kobj, &btrfs_super_ktype,
+ NULL, "%s", name);
if (error)...
2008 Sep 27
0
[PATCH 4/9] dom0 PCI: support SR-IOV capability
...if (!iov->ve)
+ return;
+
+ for (i = 0; i < iov->totalvfs; i++) {
+ iov->ve[i].vfn = i;
+ iov->ve[i].iov = iov;
+ }
+
+ iov->kobj.ktype = &iov_ktype;
+ iov->kobj.parent = &dev->dev.kobj;
+ kobject_set_name(&iov->kobj, "iov");
+ rc = kobject_register(&iov->kobj);
+ if (rc)
+ goto failed1;
+
+ for (i = 0; i < ARRAY_SIZE(iov_attr); i++) {
+ rc = sysfs_create_file(&iov->kobj, &iov_attr[i].attr);
+ if (rc)
+...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
...it(&br->vlan);
return dev;
}
@@ -278,6 +279,7 @@ static struct net_bridge_port *new_nbp(s
p->state = BR_STATE_DISABLED;
INIT_WORK(&p->carrier_check, port_carrier_check, dev);
br_stp_port_timer_init(p);
+ br_vlan_init(&p->vlan);
kobject_init(&p->kobj);
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
Index: wireless-dev/net/bridge/br_input.c
===================================================================
--- wireless-dev.orig/net/bridge/br_input.c
+++ wireless-dev/net/bridge/br_input.c
@@ -26,12 +26,20 @@ static void br_pass_frame_up(struct net_
{...