From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: 'Mark Brown' <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
Date: Wed, 04 Dec 2013 12:42:50 +0100 [thread overview]
Message-ID: <529F153A.6060402@metafoo.de> (raw)
In-Reply-To: <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
On 12/04/2013 06:15 AM, Jingoo Han wrote:
> Use devm_spi_register_master() to make cleanup paths simpler,
> and remove unnecessary remove().
>
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Looks good, thanks.
Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
> ---
> drivers/spi/spi-xcomm.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
> index 4258c71..24c40b1 100644
> --- a/drivers/spi/spi-xcomm.c
> +++ b/drivers/spi/spi-xcomm.c
> @@ -231,22 +231,13 @@ static int spi_xcomm_probe(struct i2c_client *i2c,
> master->dev.of_node = i2c->dev.of_node;
> i2c_set_clientdata(i2c, master);
>
> - ret = spi_register_master(master);
> + ret = devm_spi_register_master(&i2c->dev, master);
> if (ret < 0)
> spi_master_put(master);
>
> return ret;
> }
>
> -static int spi_xcomm_remove(struct i2c_client *i2c)
> -{
> - struct spi_master *master = i2c_get_clientdata(i2c);
> -
> - spi_unregister_master(master);
> -
> - return 0;
> -}
> -
> static const struct i2c_device_id spi_xcomm_ids[] = {
> { "spi-xcomm" },
> { },
> @@ -259,7 +250,6 @@ static struct i2c_driver spi_xcomm_driver = {
> },
> .id_table = spi_xcomm_ids,
> .probe = spi_xcomm_probe,
> - .remove = spi_xcomm_remove,
> };
> module_i2c_driver(spi_xcomm_driver);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-04 11:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 5:11 [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master() Jingoo Han
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 5:13 ` [PATCH 2/4] spi: rcar: " Jingoo Han
[not found] ` <002e01cef0af$9e0a6ef0$da1f4cd0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-09 18:00 ` Mark Brown
2013-12-04 5:14 ` [PATCH 3/4] spi: sc18is602: " Jingoo Han
[not found] ` <002f01cef0af$b618e170$224aa450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 6:03 ` Guenter Roeck
2013-12-04 12:54 ` Mark Brown
2013-12-04 5:15 ` [PATCH 4/4] spi: spi-xcomm: " Jingoo Han
[not found] ` <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 11:42 ` Lars-Peter Clausen [this message]
2013-12-04 12:52 ` Mark Brown
2013-12-04 12:23 ` [PATCH 1/4] spi: mips-lantiq: " thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-12-04 12:55 ` Mark Brown
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=529F153A.6060402@metafoo.de \
--to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.