* [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master()
@ 2013-12-04 5:11 Jingoo Han
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-12-04 5:11 UTC (permalink / raw)
To: 'Mark Brown'
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
'Thomas Langer', 'John Crispin'
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>
---
drivers/spi/spi-falcon.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
index c7a74f0..dd5bd46 100644
--- a/drivers/spi/spi-falcon.c
+++ b/drivers/spi/spi-falcon.c
@@ -433,21 +433,12 @@ static int falcon_sflash_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret)
spi_master_put(master);
return ret;
}
-static int falcon_sflash_remove(struct platform_device *pdev)
-{
- struct falcon_sflash *priv = platform_get_drvdata(pdev);
-
- spi_unregister_master(priv->master);
-
- return 0;
-}
-
static const struct of_device_id falcon_sflash_match[] = {
{ .compatible = "lantiq,sflash-falcon" },
{},
@@ -456,7 +447,6 @@ MODULE_DEVICE_TABLE(of, falcon_sflash_match);
static struct platform_driver falcon_sflash_driver = {
.probe = falcon_sflash_probe,
- .remove = falcon_sflash_remove,
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
--
1.7.10.4
--
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] spi: rcar: Use devm_spi_register_master()
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-12-04 5:13 ` Jingoo Han
[not found] ` <002e01cef0af$9e0a6ef0$da1f4cd0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 5:14 ` [PATCH 3/4] spi: sc18is602: " Jingoo Han
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-12-04 5:13 UTC (permalink / raw)
To: 'Mark Brown'
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
'Laurent Pinchart'
Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
drivers/spi/spi-rspi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 19c65c4..cfdbb42 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -887,7 +887,6 @@ static int rspi_remove(struct platform_device *pdev)
{
struct rspi_data *rspi = platform_get_drvdata(pdev);
- spi_unregister_master(rspi->master);
rspi_release_dma(rspi);
return 0;
@@ -972,7 +971,7 @@ static int rspi_probe(struct platform_device *pdev)
goto error2;
}
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret < 0) {
dev_err(&pdev->dev, "spi_register_master error.\n");
goto error2;
--
1.7.10.4
--
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] spi: sc18is602: Use devm_spi_register_master()
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 5:13 ` [PATCH 2/4] spi: rcar: " Jingoo Han
@ 2013-12-04 5:14 ` Jingoo Han
[not found] ` <002f01cef0af$b618e170$224aa450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 5:15 ` [PATCH 4/4] spi: spi-xcomm: " Jingoo Han
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-12-04 5:14 UTC (permalink / raw)
To: 'Mark Brown'
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
'Guenter Roeck'
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>
---
drivers/spi/spi-sc18is602.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/spi/spi-sc18is602.c b/drivers/spi/spi-sc18is602.c
index 9eda21d..c1a01d1 100644
--- a/drivers/spi/spi-sc18is602.c
+++ b/drivers/spi/spi-sc18is602.c
@@ -319,7 +319,7 @@ static int sc18is602_probe(struct i2c_client *client,
master->transfer_one_message = sc18is602_transfer_one;
master->dev.of_node = np;
- error = spi_register_master(master);
+ error = devm_spi_register_master(dev, master);
if (error)
goto error_reg;
@@ -330,16 +330,6 @@ error_reg:
return error;
}
-static int sc18is602_remove(struct i2c_client *client)
-{
- struct sc18is602 *hw = i2c_get_clientdata(client);
- struct spi_master *master = hw->master;
-
- spi_unregister_master(master);
-
- return 0;
-}
-
static const struct i2c_device_id sc18is602_id[] = {
{ "sc18is602", sc18is602 },
{ "sc18is602b", sc18is602b },
@@ -353,7 +343,6 @@ static struct i2c_driver sc18is602_driver = {
.name = "sc18is602",
},
.probe = sc18is602_probe,
- .remove = sc18is602_remove,
.id_table = sc18is602_id,
};
--
1.7.10.4
--
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 5:13 ` [PATCH 2/4] spi: rcar: " Jingoo Han
2013-12-04 5:14 ` [PATCH 3/4] spi: sc18is602: " Jingoo Han
@ 2013-12-04 5:15 ` Jingoo Han
[not found] ` <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 12:23 ` [PATCH 1/4] spi: mips-lantiq: " thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-12-04 12:55 ` Mark Brown
4 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-12-04 5:15 UTC (permalink / raw)
To: 'Mark Brown'
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
'Lars-Peter Clausen'
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>
---
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);
--
1.7.10.4
--
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] spi: sc18is602: Use devm_spi_register_master()
[not found] ` <002f01cef0af$b618e170$224aa450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-12-04 6:03 ` Guenter Roeck
2013-12-04 12:54 ` Mark Brown
1 sibling, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2013-12-04 6:03 UTC (permalink / raw)
To: Jingoo Han, 'Mark Brown'; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
On 12/03/2013 09:14 PM, 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>
Acked-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
[not found] ` <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-12-04 11:42 ` Lars-Peter Clausen
2013-12-04 12:52 ` Mark Brown
1 sibling, 0 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2013-12-04 11:42 UTC (permalink / raw)
To: Jingoo Han; +Cc: 'Mark Brown', linux-spi-u79uwXL29TY76Z2rM5mHXA
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master()
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
` (2 preceding siblings ...)
2013-12-04 5:15 ` [PATCH 4/4] spi: spi-xcomm: " Jingoo Han
@ 2013-12-04 12:23 ` thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-12-04 12:55 ` Mark Brown
4 siblings, 0 replies; 11+ messages in thread
From: thomas.langer-th3ZBGNqt+7QT0dZR+AlfA @ 2013-12-04 12:23 UTC (permalink / raw)
To: jg1.han-Sze3O3UU22JBDgjK7y7TUQ, broonie-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, blogic-p3rKhJxN3npAfugRpC6u6w
Jingoo Han wrote on 2013-12-04:
> 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: Thomas Langer <thomas.langer-th3ZBGNqt+7QT0dZR+AlfA@public.gmane.org>
> ---
> drivers/spi/spi-falcon.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
> index c7a74f0..dd5bd46 100644
> --- a/drivers/spi/spi-falcon.c
> +++ b/drivers/spi/spi-falcon.c
> @@ -433,21 +433,12 @@ static int falcon_sflash_probe(struct
> platform_device *pdev)
>
> platform_set_drvdata(pdev, priv);
>
> - ret = spi_register_master(master);
> + ret = devm_spi_register_master(&pdev->dev, master);
> if (ret)
> spi_master_put(master);
> return ret;
> }
>
> -static int falcon_sflash_remove(struct platform_device *pdev)
> -{
> - struct falcon_sflash *priv = platform_get_drvdata(pdev);
> -
> - spi_unregister_master(priv->master);
> -
> - return 0;
> -}
> -
> static const struct of_device_id falcon_sflash_match[] = {
> { .compatible = "lantiq,sflash-falcon" },
> {},
> @@ -456,7 +447,6 @@ MODULE_DEVICE_TABLE(of, falcon_sflash_match);
>
> static struct platform_driver falcon_sflash_driver = {
> .probe = falcon_sflash_probe,
> - .remove = falcon_sflash_remove,
> .driver = {
> .name = DRV_NAME,
> .owner = THIS_MODULE,
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
[not found] ` <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 11:42 ` Lars-Peter Clausen
@ 2013-12-04 12:52 ` Mark Brown
1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-12-04 12:52 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Lars-Peter Clausen'
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
On Wed, Dec 04, 2013 at 02:15:23PM +0900, Jingoo Han wrote:
> Use devm_spi_register_master() to make cleanup paths simpler,
> and remove unnecessary remove().
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] spi: sc18is602: Use devm_spi_register_master()
[not found] ` <002f01cef0af$b618e170$224aa450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 6:03 ` Guenter Roeck
@ 2013-12-04 12:54 ` Mark Brown
1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-12-04 12:54 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Guenter Roeck'
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
On Wed, Dec 04, 2013 at 02:14:30PM +0900, Jingoo Han wrote:
> Use devm_spi_register_master() to make cleanup paths simpler,
> and remove unnecessary remove().
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master()
[not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
` (3 preceding siblings ...)
2013-12-04 12:23 ` [PATCH 1/4] spi: mips-lantiq: " thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
@ 2013-12-04 12:55 ` Mark Brown
4 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-12-04 12:55 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Thomas Langer',
'John Crispin'
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
On Wed, Dec 04, 2013 at 02:11:56PM +0900, Jingoo Han wrote:
> Use devm_spi_register_master() to make cleanup paths simpler,
> and remove unnecessary remove().
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] spi: rcar: Use devm_spi_register_master()
[not found] ` <002e01cef0af$9e0a6ef0$da1f4cd0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-12-09 18:00 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-12-09 18:00 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Laurent Pinchart'
[-- Attachment #1: Type: text/plain, Size: 142 bytes --]
On Wed, Dec 04, 2013 at 02:13:50PM +0900, Jingoo Han wrote:
> Use devm_spi_register_master() to make cleanup paths simpler.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-12-09 18:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).