Skip to content
Browse files

Changes to make lddbus compile.

* struct device no longer has a bus_id field; use dev_name and
  set_dev_name to manipulate the name instead.
  • Loading branch information...
1 parent 7016142 commit e3c3b2aa6d2e75c4dedfb648f5127a1499a7280a @jesstess committed Nov 25, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 examples/lddbus/lddbus.c
View
6 examples/lddbus/lddbus.c
@@ -42,7 +42,7 @@ static int ldd_uevent(struct device *dev, struct kobj_uevent_env *env)
*/
static int ldd_match(struct device *dev, struct device_driver *driver)
{
- return !strncmp(dev->bus_id, driver->name, strlen(driver->name));
+ return !strncmp(dev_name(dev), driver->name, strlen(driver->name));
}
@@ -55,7 +55,6 @@ static void ldd_bus_release(struct device *dev)
}
struct device ldd_bus = {
- .bus_id = "ldd0",
.release = ldd_bus_release
};
@@ -98,7 +97,7 @@ int register_ldd_device(struct ldd_device *ldddev)
ldddev->dev.bus = &ldd_bus_type;
ldddev->dev.parent = &ldd_bus;
ldddev->dev.release = ldd_dev_release;
- strncpy(ldddev->dev.bus_id, ldddev->name, BUS_ID_SIZE);
+ dev_set_name(&ldddev->dev, "%s", ldddev->name);
return device_register(&ldddev->dev);
}
EXPORT_SYMBOL(register_ldd_device);
@@ -132,7 +131,6 @@ int register_ldd_driver(struct ldd_driver *driver)
if (ret)
return ret;
driver->version_attr.attr.name = "version";
- driver->version_attr.attr.owner = driver->module;
driver->version_attr.attr.mode = S_IRUGO;
driver->version_attr.show = show_version;
driver->version_attr.store = NULL;

0 comments on commit e3c3b2a

Please sign in to comment.
Something went wrong with that request. Please try again.