linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Popple <alistair@popple.id.au>
To: Joel Stanley <joel@jms.id.au>
Cc: devicetree@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>,
	Eddie James <eajames@linux.ibm.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Rob Herring <robh+dt@kernel.org>, Jeremy Kerr <jk@ozlabs.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-arm-kernel@lists.infradead.org, linux-fsi@lists.ozlabs.org
Subject: Re: [PATCH v2 02/11] fsi: Move master attributes to fsi-master class
Date: Fri, 08 Nov 2019 20:18:57 +1100	[thread overview]
Message-ID: <1875965.3q8Q5IJkUj@townsend> (raw)
In-Reply-To: <20191108051945.7109-3-joel@jms.id.au>

Acked-by: Alistair Popple <alistair@popple.id.au>

On Friday, 8 November 2019 4:19:36 PM AEDT Joel Stanley wrote:
> From: Jeremy Kerr <jk@ozlabs.org>
> 
> Populate fsi_master_class->dev_attrs with the existing attribute
> definitions, so we don't need to explicitly register.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  drivers/fsi/fsi-core.c | 23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index 0861f6097b33..c773c65a5058 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -1241,8 +1241,17 @@ static ssize_t master_break_store(struct device *dev,
>  
>  static DEVICE_ATTR(break, 0200, NULL, master_break_store);
>  
> +static struct attribute *master_attrs[] = {
> +	&dev_attr_break.attr,
> +	&dev_attr_rescan.attr,
> +	NULL
> +};
> +
> +ATTRIBUTE_GROUPS(master);
> +
>  struct class fsi_master_class = {
>  	.name = "fsi-master",
> +	.dev_groups = master_groups,
>  };
>  
>  int fsi_master_register(struct fsi_master *master)
> @@ -1261,20 +1270,6 @@ int fsi_master_register(struct fsi_master *master)
>  		return rc;
>  	}
>  
> -	rc = device_create_file(&master->dev, &dev_attr_rescan);
> -	if (rc) {
> -		device_del(&master->dev);
> -		ida_simple_remove(&master_ida, master->idx);
> -		return rc;
> -	}
> -
> -	rc = device_create_file(&master->dev, &dev_attr_break);
> -	if (rc) {
> -		device_del(&master->dev);
> -		ida_simple_remove(&master_ida, master->idx);
> -		return rc;
> -	}
> -
>  	np = dev_of_node(&master->dev);
>  	if (!of_property_read_bool(np, "no-scan-on-init")) {
>  		mutex_lock(&master->scan_lock);
> 





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-11-08  9:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  5:19 [PATCH v2 00/11] fsi: Patches for 5.5 Joel Stanley
2019-11-08  5:19 ` [PATCH v2 01/11] fsi: Add fsi-master class Joel Stanley
2019-11-08  9:17   ` Alistair Popple
2019-11-08  5:19 ` [PATCH v2 02/11] fsi: Move master attributes to " Joel Stanley
2019-11-08  9:18   ` Alistair Popple [this message]
2019-11-08  5:19 ` [PATCH v2 03/11] ABI: Update FSI path documentation Joel Stanley
2019-11-08  9:27   ` Alistair Popple
2019-11-08  5:19 ` [PATCH v2 04/11] trace: fsi: Print transfer size unsigned Joel Stanley
2019-11-08  9:21   ` Alistair Popple
2019-11-08  5:19 ` [PATCH v2 05/11] fsi: core: Fix small accesses and unaligned offsets via sysfs Joel Stanley
2019-11-08  5:19 ` [PATCH v2 06/11] fsi: fsi_master_class can be static Joel Stanley
2019-11-08  5:19 ` [PATCH v2 07/11] fsi: Move defines to common header Joel Stanley
2019-11-08  5:19 ` [PATCH v2 08/11] dt-bindings: fsi: Add description of FSI master Joel Stanley
2019-11-08  9:23   ` Alistair Popple
2019-11-08 10:28   ` Greg KH
2019-11-08  5:19 ` [PATCH v2 09/11] fsi: Add ast2600 master driver Joel Stanley
2019-11-08  9:29   ` Alistair Popple
2019-11-08  5:19 ` [PATCH v2 10/11] fsi: aspeed: Add trace points Joel Stanley
2019-11-08  5:19 ` [PATCH v2 11/11] fsi: aspeed: Fix OPB0 byte order register values Joel Stanley
2019-11-08  9:31   ` Alistair Popple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1875965.3q8Q5IJkUj@townsend \
    --to=alistair@popple.id.au \
    --cc=devicetree@vger.kernel.org \
    --cc=eajames@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).