Skip to contentSkip to conversation

Input: ad714x-spi - Remove redundant spi_set_drvdata

PATCH Applied Sachin Kamat 2 participants 3 messages Sep 20, 2013

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

PATCH 1/4 Input: ad714x-spi - Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

---
Series compile tested.

---
 drivers/input/misc/ad714x-spi.c |    1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/ad714x-spi.c +0 -1
index 6189148..3a90b71 100644
@@ -108,7 +108,6 @@ static int ad714x_spi_remove(struct spi_device *spi)
 	struct ad714x_chip *chip = spi_get_drvdata(spi);
 
 	ad714x_remove(chip);
-	spi_set_drvdata(spi, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/4 Input: ad7877 - Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

---
 drivers/input/touchscreen/ad7877.c |    2 --
 1 file changed, 2 deletions(-)
drivers/input/touchscreen/ad7877.c +0 -2
index f3a174a..69834dd 100644
@@ -806,7 +806,6 @@ err_free_irq:
 err_free_mem:
 	input_free_device(input_dev);
 	kfree(ts);
-	spi_set_drvdata(spi, NULL);
 	return err;
 }
 
@@ -823,7 +822,6 @@ static int ad7877_remove(struct spi_device *spi)
 	kfree(ts);
 
 	dev_dbg(&spi->dev, "unregistered touchscreen\n");
-	spi_set_drvdata(spi, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
maintainer Applied
#2 lore raw
In reply to Sachin Kamat
Quoted 6 lines · Sachin Kamat

Driver core sets driver data to NULL upon failure or remove.

---
Series compile tested.

Applied all 4, thank you.

Quoted 19 lines
---
 drivers/input/misc/ad714x-spi.c |    1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/ad714x-spi.c +0 -1
index 6189148..3a90b71 100644
@@ -108,7 +108,6 @@ static int ad714x_spi_remove(struct spi_device *spi)
 	struct ad714x_chip *chip = spi_get_drvdata(spi);
 
 	ad714x_remove(chip);
-	spi_set_drvdata(spi, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
Signature · 1 line
Dmitry