spi: mips-lantiq: Use devm_spi_register_master()
PATCH 1/4 spi: mips-lantiq: Use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler, and remove unnecessary remove().
--- drivers/spi/spi-falcon.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/spi/spi-falcon.c +1 -11
@@ -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 ,
Signature · 7 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 002d01cef0af$5a21f140$0e65d3c0$%[email protected]
PATCH 2/4 spi: rcar: Use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler.
--- drivers/spi/spi-rspi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spi/spi-rspi.c +1 -2
@@ -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;
Signature · 7 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 002e01cef0af$9e0a6ef0$da1f4cd0$%[email protected]
Mark Brown
AppliedRe: [PATCH 2/4] spi: rcar: Use devm_spi_register_master()
Quoted 1 line · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler.
Applied, thanks.
PATCH 3/4 spi: sc18is602: Use devm_spi_register_master()
In reply to a message not in the archiveUse devm_spi_register_master() to make cleanup paths simpler, and remove unnecessary remove().
--- drivers/spi/spi-sc18is602.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/spi/spi-sc18is602.c +1 -12
@@ -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, };
Signature · 7 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 002f01cef0af$b618e170$224aa450$%[email protected]
Guenter Roeck
Acked-byRe: [PATCH 3/4] spi: sc18is602: Use devm_spi_register_master()
Quoted 4 lines · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().Signed-off-by Jingoo Han <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedRe: [PATCH 3/4] spi: sc18is602: Use devm_spi_register_master()
In reply to a message not in the archiveQuoted 2 lines · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().
Applied, thanks.
PATCH 4/4 spi: spi-xcomm: Use devm_spi_register_master()
In reply to a message not in the archiveUse devm_spi_register_master() to make cleanup paths simpler, and remove unnecessary remove().
--- drivers/spi/spi-xcomm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/spi/spi-xcomm.c +1 -11
@@ -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);
Signature · 7 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 003001cef0af$d5c84ce0$8158e6a0$%[email protected]
Lars-Peter Clausen
Acked-byRe: [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
Quoted 4 lines · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().Signed-off-by Jingoo Han <[email protected]>
Looks good, thanks.
Quoted 34 lines
--- drivers/spi/spi-xcomm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)drivers/spi/spi-xcomm.c +1
-10@@ -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" }, { },
drivers/spi/spi-xcomm.c static struct i2c_driver spi_xcomm_driver = { · line 255
Quoted 7 lines
drivers/spi/spi-xcomm.c +0
-1@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedRe: [PATCH 4/4] spi: spi-xcomm: Use devm_spi_register_master()
In reply to a message not in the archiveQuoted 2 lines · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().
Applied, thanks.
[email protected]
Acked-byJingoo Han wrote on 2013-12-04:
Quoted 4 lines
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().Signed-off-by Jingoo Han <[email protected]>
Looks good, thanks.
Quoted 33 lines
--- drivers/spi/spi-falcon.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)drivers/spi/spi-falcon.c +1
-10@@ -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" },drivers/spi/spi-falcon.c +0
-0{},
drivers/spi/spi-falcon.c MODULE_DEVICE_TABLE(of, falcon_sflash_match); · line 452
Quoted 7 lines
drivers/spi/spi-falcon.c +0
-1@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedQuoted 2 lines · Jingoo Han
Use
devm_spi_register_master()to make cleanup paths simpler, and remove unnecessaryremove().
Applied, thanks.