From a1a0b45c02a146b5d9519540547eb46a52794ff1 Mon Sep 17 00:00:00 2001 From: Joachim Fenkes Date: Wed, 6 Aug 2008 00:30:18 +1000 Subject: [PATCH] --- yaml --- r: 108907 b: refs/heads/master c: 4589f1fe570c2c786b72eff146b2f168821882c6 h: refs/heads/master i: 108905: 55e8ee62220a729b8312a308280d8b66a3f41da0 108903: eb5eda3ea38543921369a3a38e6dcd6f2b855b2f v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/ibmebus.c | 12 ------------ trunk/drivers/of/device.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 0a90b4a5582c..935f40b473bd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7230ced4925b07c259a62b515d8278c6bb1ad98c +refs/heads/master: 4589f1fe570c2c786b72eff146b2f168821882c6 diff --git a/trunk/arch/powerpc/kernel/ibmebus.c b/trunk/arch/powerpc/kernel/ibmebus.c index 9d42eb57aea3..a06362223f8d 100644 --- a/trunk/arch/powerpc/kernel/ibmebus.c +++ b/trunk/arch/powerpc/kernel/ibmebus.c @@ -233,17 +233,6 @@ void ibmebus_free_irq(u32 ist, void *dev_id) } EXPORT_SYMBOL(ibmebus_free_irq); -static ssize_t name_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - return sprintf(buf, "%s\n", to_of_device(dev)->node->name); -} - -static struct device_attribute ibmebus_dev_attrs[] = { - __ATTR_RO(name), - __ATTR_NULL -}; - static char *ibmebus_chomp(const char *in, size_t count) { char *out = kmalloc(count + 1, GFP_KERNEL); @@ -327,7 +316,6 @@ static struct bus_attribute ibmebus_bus_attrs[] = { struct bus_type ibmebus_bus_type = { .uevent = of_device_uevent, - .dev_attrs = ibmebus_dev_attrs, .bus_attrs = ibmebus_bus_attrs }; EXPORT_SYMBOL(ibmebus_bus_type); diff --git a/trunk/drivers/of/device.c b/trunk/drivers/of/device.c index 8a1d93a2bb81..51e5214071da 100644 --- a/trunk/drivers/of/device.c +++ b/trunk/drivers/of/device.c @@ -57,6 +57,15 @@ static ssize_t devspec_show(struct device *dev, return sprintf(buf, "%s\n", ofdev->node->full_name); } +static ssize_t name_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct of_device *ofdev; + + ofdev = to_of_device(dev); + return sprintf(buf, "%s\n", ofdev->node->name); +} + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -71,6 +80,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute of_platform_device_attrs[] = { __ATTR_RO(devspec), + __ATTR_RO(name), __ATTR_RO(modalias), __ATTR_NULL };