* [PATCH 5/7] gpio: use class_groups instead of class_attrs
[not found] <20170608081242.27061-1-gregkh@linuxfoundation.org>
@ 2017-06-08 8:12 ` Greg Kroah-Hartman
2017-06-08 8:23 ` Robert P. J. Day
2017-06-08 12:05 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-06-08 8:12 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Linus Walleij, Alexandre Courbot, linux-gpio
The class_attrs pointer is long depreciated, and is about to be finally
removed, so move to use the class_groups pointer instead.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: <linux-gpio@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpiolib-sysfs.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 4b44dd97c07f..16fe9742597b 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -479,6 +479,7 @@ static ssize_t export_store(struct class *class,
pr_debug("%s: status %d\n", __func__, status);
return status ? : len;
}
+static CLASS_ATTR_WO(export);
static ssize_t unexport_store(struct class *class,
struct class_attribute *attr,
@@ -514,18 +515,20 @@ static ssize_t unexport_store(struct class *class,
pr_debug("%s: status %d\n", __func__, status);
return status ? : len;
}
+static CLASS_ATTR_WO(unexport);
-static struct class_attribute gpio_class_attrs[] = {
- __ATTR(export, 0200, NULL, export_store),
- __ATTR(unexport, 0200, NULL, unexport_store),
- __ATTR_NULL,
+static struct attribute *gpio_class_attrs[] = {
+ &class_attr_export.attr,
+ &class_attr_unexport.attr,
+ NULL,
};
+ATTRIBUTE_GROUPS(gpio_class);
static struct class gpio_class = {
.name = "gpio",
.owner = THIS_MODULE,
- .class_attrs = gpio_class_attrs,
+ .class_groups = gpio_class_groups,
};
--
2.13.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 5/7] gpio: use class_groups instead of class_attrs
2017-06-08 8:12 ` [PATCH 5/7] gpio: use class_groups instead of class_attrs Greg Kroah-Hartman
@ 2017-06-08 8:23 ` Robert P. J. Day
2017-06-08 12:05 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2017-06-08 8:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-gpio
On Thu, 8 Jun 2017, Greg Kroah-Hartman wrote:
> The class_attrs pointer is long depreciated, and is about to be finally
^^^^^^^^^^^ deprecated
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/7] gpio: use class_groups instead of class_attrs
2017-06-08 8:12 ` [PATCH 5/7] gpio: use class_groups instead of class_attrs Greg Kroah-Hartman
2017-06-08 8:23 ` Robert P. J. Day
@ 2017-06-08 12:05 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-06-08 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org, Alexandre Courbot,
linux-gpio@vger.kernel.org
On Thu, Jun 8, 2017 at 10:12 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> The class_attrs pointer is long depreciated, and is about to be finally
> removed, so move to use the class_groups pointer instead.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: <linux-gpio@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Please take this through the driver core tree.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-08 12:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170608081242.27061-1-gregkh@linuxfoundation.org>
2017-06-08 8:12 ` [PATCH 5/7] gpio: use class_groups instead of class_attrs Greg Kroah-Hartman
2017-06-08 8:23 ` Robert P. J. Day
2017-06-08 12:05 ` Linus Walleij
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).