linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/11] bcma: convert bus code to use dev_groups
       [not found] <1381128950-28125-1-git-send-email-gregkh@linuxfoundation.org>
@ 2013-10-07  6:55 ` Greg Kroah-Hartman
  2013-10-09 15:13   ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-07  6:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Rafał Miłecki, linux-wireless

The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the bcma bus code to use the
correct field.

Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: <linux-wireless@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

Rafał, I can take this through my driver-core tree if you like, just let
me know what would be the easiest for you.

 drivers/bcma/main.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 90ee350..e15430a 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -30,28 +30,37 @@ static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, cha
 	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
 	return sprintf(buf, "0x%03X\n", core->id.manuf);
 }
+static DEVICE_ATTR_RO(manuf);
+
 static ssize_t id_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
 	return sprintf(buf, "0x%03X\n", core->id.id);
 }
+static DEVICE_ATTR_RO(id);
+
 static ssize_t rev_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
 	return sprintf(buf, "0x%02X\n", core->id.rev);
 }
+static DEVICE_ATTR_RO(rev);
+
 static ssize_t class_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
 	return sprintf(buf, "0x%X\n", core->id.class);
 }
-static struct device_attribute bcma_device_attrs[] = {
-	__ATTR_RO(manuf),
-	__ATTR_RO(id),
-	__ATTR_RO(rev),
-	__ATTR_RO(class),
-	__ATTR_NULL,
+static DEVICE_ATTR_RO(class);
+
+static struct attribute *bcma_device_attrs[] = {
+	&dev_attr_manuf.attr,
+	&dev_attr_id.attr,
+	&dev_attr_rev.attr,
+	&dev_attr_class.attr,
+	NULL,
 };
+ATTRIBUTE_GROUPS(bcma_device);
 
 static struct bus_type bcma_bus_type = {
 	.name		= "bcma",
@@ -59,7 +68,7 @@ static struct bus_type bcma_bus_type = {
 	.probe		= bcma_device_probe,
 	.remove		= bcma_device_remove,
 	.uevent		= bcma_device_uevent,
-	.dev_attrs	= bcma_device_attrs,
+	.dev_groups	= bcma_device_groups,
 };
 
 static u16 bcma_cc_core_id(struct bcma_bus *bus)
-- 
1.8.4.6.g82e253f.dirty


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 06/11] bcma: convert bus code to use dev_groups
  2013-10-07  6:55 ` [PATCH 06/11] bcma: convert bus code to use dev_groups Greg Kroah-Hartman
@ 2013-10-09 15:13   ` John W. Linville
  2013-10-10  8:08     ` Rafał Miłecki
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2013-10-09 15:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Rafał Miłecki, linux-wireless

On Sun, Oct 06, 2013 at 11:55:45PM -0700, Greg Kroah-Hartman wrote:
> The dev_attrs field of struct bus_type is going away soon, dev_groups
> should be used instead.  This converts the bcma bus code to use the
> correct field.
> 
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Cc: <linux-wireless@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> 
> Rafał, I can take this through my driver-core tree if you like, just let
> me know what would be the easiest for you.

Makes sense to me...

> 
>  drivers/bcma/main.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
> index 90ee350..e15430a 100644
> --- a/drivers/bcma/main.c
> +++ b/drivers/bcma/main.c
> @@ -30,28 +30,37 @@ static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, cha
>  	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
>  	return sprintf(buf, "0x%03X\n", core->id.manuf);
>  }
> +static DEVICE_ATTR_RO(manuf);
> +
>  static ssize_t id_show(struct device *dev, struct device_attribute *attr, char *buf)
>  {
>  	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
>  	return sprintf(buf, "0x%03X\n", core->id.id);
>  }
> +static DEVICE_ATTR_RO(id);
> +
>  static ssize_t rev_show(struct device *dev, struct device_attribute *attr, char *buf)
>  {
>  	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
>  	return sprintf(buf, "0x%02X\n", core->id.rev);
>  }
> +static DEVICE_ATTR_RO(rev);
> +
>  static ssize_t class_show(struct device *dev, struct device_attribute *attr, char *buf)
>  {
>  	struct bcma_device *core = container_of(dev, struct bcma_device, dev);
>  	return sprintf(buf, "0x%X\n", core->id.class);
>  }
> -static struct device_attribute bcma_device_attrs[] = {
> -	__ATTR_RO(manuf),
> -	__ATTR_RO(id),
> -	__ATTR_RO(rev),
> -	__ATTR_RO(class),
> -	__ATTR_NULL,
> +static DEVICE_ATTR_RO(class);
> +
> +static struct attribute *bcma_device_attrs[] = {
> +	&dev_attr_manuf.attr,
> +	&dev_attr_id.attr,
> +	&dev_attr_rev.attr,
> +	&dev_attr_class.attr,
> +	NULL,
>  };
> +ATTRIBUTE_GROUPS(bcma_device);
>  
>  static struct bus_type bcma_bus_type = {
>  	.name		= "bcma",
> @@ -59,7 +68,7 @@ static struct bus_type bcma_bus_type = {
>  	.probe		= bcma_device_probe,
>  	.remove		= bcma_device_remove,
>  	.uevent		= bcma_device_uevent,
> -	.dev_attrs	= bcma_device_attrs,
> +	.dev_groups	= bcma_device_groups,
>  };
>  
>  static u16 bcma_cc_core_id(struct bcma_bus *bus)
> -- 
> 1.8.4.6.g82e253f.dirty
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 06/11] bcma: convert bus code to use dev_groups
  2013-10-09 15:13   ` John W. Linville
@ 2013-10-10  8:08     ` Rafał Miłecki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2013-10-10  8:08 UTC (permalink / raw)
  To: John W. Linville
  Cc: Greg Kroah-Hartman, Linux Kernel Mailing List,
	linux-wireless@vger.kernel.org

2013/10/9 John W. Linville <linville@tuxdriver.com>:
> On Sun, Oct 06, 2013 at 11:55:45PM -0700, Greg Kroah-Hartman wrote:
>> The dev_attrs field of struct bus_type is going away soon, dev_groups
>> should be used instead.  This converts the bcma bus code to use the
>> correct field.
>>
>> Cc: Rafał Miłecki <zajec5@gmail.com>
>> Cc: <linux-wireless@vger.kernel.org>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>>
>> Rafał, I can take this through my driver-core tree if you like, just let
>> me know what would be the easiest for you.
>
> Makes sense to me...

Oops, sorry, missed that. I'll just agree with John :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-10  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1381128950-28125-1-git-send-email-gregkh@linuxfoundation.org>
2013-10-07  6:55 ` [PATCH 06/11] bcma: convert bus code to use dev_groups Greg Kroah-Hartman
2013-10-09 15:13   ` John W. Linville
2013-10-10  8:08     ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).