Skip to contentSkip to conversation

Input: cobalt_btns - Remove redundant dev_set_drvdata

PATCH Applied Sachin Kamat 2 participants 6 messages Sep 6, 2013 – Sep 21, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Input: cobalt_btns - Remove redundant dev_set_drvdata

Driver core sets the data to NULL upon release or probe failure. Hence explicit setting is not necessary.

---
 drivers/input/misc/cobalt_btns.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/input/misc/cobalt_btns.c +0 -2
index 4f77f87..b5d71d2 100644
@@ -131,7 +131,6 @@ static int cobalt_buttons_probe(struct platform_device *pdev)
  err_free_mem:
 	input_free_polled_device(poll_dev);
 	kfree(bdev);
-	dev_set_drvdata(&pdev->dev, NULL);
 	return error;
 }
 
@@ -144,7 +143,6 @@ static int cobalt_buttons_remove(struct platform_device *pdev)
 	input_free_polled_device(bdev->poll_dev);
 	iounmap(bdev->reg);
 	kfree(bdev);
-	dev_set_drvdata(dev, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 2/4 Input: cyttsp4_core - Remove redundant dev_set_drvdata

Driver core sets the data to NULL upon release or probe failure. Hence explicit setting is not necessary.

---
 drivers/input/touchscreen/cyttsp4_core.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/input/touchscreen/cyttsp4_core.c +0 -2
index d038575..42d830e 100644
@@ -2113,7 +2113,6 @@ error_startup:
 error_request_irq:
 	if (cd->cpdata->init)
 		cd->cpdata->init(cd->cpdata, 0, dev);
-	dev_set_drvdata(dev, NULL);
 error_free_xfer:
 	kfree(cd->xfer_buf);
 error_free_cd:
@@ -2151,7 +2150,6 @@ int cyttsp4_remove(struct cyttsp4 *cd)
 	free_irq(cd->irq, cd);
 	if (cd->cpdata->init)
 		cd->cpdata->init(cd->cpdata, 0, dev);
-	dev_set_drvdata(dev, NULL);
 	cyttsp4_free_si_ptrs(cd);
 	kfree(cd);
 	return 0;
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 3/4 Input: htcpen - Remove redundant dev_set_drvdata

In reply to Sachin Kamat

Driver core sets the data to NULL upon release or probe failure. Hence explicit setting is not necessary.

Cc Pau Oliva Fora <[email protected]>
---
 drivers/input/touchscreen/htcpen.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/input/touchscreen/htcpen.c +0 -2
index 6650085..92e2243 100644
@@ -186,8 +186,6 @@ static int htcpen_isa_remove(struct device *dev, unsigned int id)
 	release_region(HTCPEN_PORT_INIT, 1);
 	release_region(HTCPEN_PORT_IRQ_CLEAR, 1);
 
-	dev_set_drvdata(dev, NULL);
-
 	return 0;
 }
 
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 4/4 Input: rb532_button - Remove redundant dev_set_drvdata

In reply to Sachin Kamat

Driver core sets the data to NULL upon release or probe failure. Hence explicit setting is not necessary.

---
 drivers/input/misc/rb532_button.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/input/misc/rb532_button.c +0 -1
index fb4f8ac..83fff38 100644
@@ -87,7 +87,6 @@ static int rb532_button_remove(struct platform_device *pdev)
 
 	input_unregister_polled_device(poll_dev);
 	input_free_polled_device(poll_dev);
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.4.1
#4 lore raw
In reply to Sachin Kamat

Hi Dmitry,

Now that the merge window is closed, a gentle ping on this series :)

Quoted 32 lines · Sachin Kamat

Driver core sets the data to NULL upon release or probe failure. Hence explicit setting is not necessary.

---
 drivers/input/misc/cobalt_btns.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/input/misc/cobalt_btns.c +0 -3
index 4f77f87..b5d71d2 100644
@@ -131,7 +131,6 @@ static int cobalt_buttons_probe(struct platform_device *pdev)
  err_free_mem:
        input_free_polled_device(poll_dev);
        kfree(bdev);
-       dev_set_drvdata(&pdev->dev, NULL);
        return error;
 }
 
@@ -144,7 +143,6 @@ static int cobalt_buttons_remove(struct platform_device *pdev)
        input_free_polled_device(bdev->poll_dev);
        iounmap(bdev->reg);
        kfree(bdev);
-       dev_set_drvdata(dev, NULL);
 
        return 0;
 }
--

1.7.4.1

Signature · 2 lines
With warm regards,
Sachin
maintainer Applied
#5 lore raw
Quoted 3 lines · Sachin Kamat

Hi Dmitry,

Now that the merge window is closed, a gentle ping on this series :)

Applied all 4, thank you.

Signature · 1 line
Dmitry