lkml.org 
[lkml]   [2018]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 04/10] pseries: ibmebus.c: convert to use BUS_ATTR_WO
Date
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> We are trying to get rid of BUS_ATTR() and the usage of that in
> ibmebus.c can be trivially converted to use BUS_ATTR_WO(), so use that
> instead.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> arch/powerpc/platforms/pseries/ibmebus.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)

LGTM.

Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers

> diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c
> index 5b4a56131904..84e8ec4011ba 100644
> --- a/arch/powerpc/platforms/pseries/ibmebus.c
> +++ b/arch/powerpc/platforms/pseries/ibmebus.c
> @@ -261,8 +261,7 @@ static char *ibmebus_chomp(const char *in, size_t count)
> return out;
> }
>
> -static ssize_t ibmebus_store_probe(struct bus_type *bus,
> - const char *buf, size_t count)
> +static ssize_t probe_store(struct bus_type *bus, const char *buf, size_t count)
> {
> struct device_node *dn = NULL;
> struct device *dev;
> @@ -298,10 +297,9 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
> return rc;
> return count;
> }
> -static BUS_ATTR(probe, 0200, NULL, ibmebus_store_probe);
> +static BUS_ATTR_WO(probe);
>
> -static ssize_t ibmebus_store_remove(struct bus_type *bus,
> - const char *buf, size_t count)
> +static ssize_t remove_store(struct bus_type *bus, const char *buf, size_t count)
> {
> struct device *dev;
> char *path;
> @@ -325,7 +323,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus,
> return -ENODEV;
> }
> }
> -static BUS_ATTR(remove, 0200, NULL, ibmebus_store_remove);
> +static BUS_ATTR_WO(remove);
>
> static struct attribute *ibmbus_bus_attrs[] = {
> &bus_attr_probe.attr,
> --
> 2.20.1

\
 
 \ /
  Last update: 2018-12-27 06:28    [W:0.092 / U:1.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site