The struct kobject does not have a name member on older kernels
so naming something naming a kobject will be futile. This implies
dev_set_name() won't be able to rename the kobject. This may
actually bust 2.6.24, I believe we discussed this particular
issue on the linux-wireless mailing list at some point with
a person trying 2.6.24. If there is an issue with this patch
we can go back and check the list. I'm offline rigtt now though
so trying to get compilation to work at least.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
+/* 2.6.24 does not have the struct kobject with a name */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
+
/**
* kobject_set_name_vargs - Set the name of an kobject
* @kobj: struct kobject to set the name of
kfree(old_name);
return 0;
}
+#else
+static
+int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
+ va_list vargs)
+{
+ return 0;
+}
+#endif
/**
* dev_set_name - set a device name