Skip to contentSkip to conversation

gpio: Remove unnecessary driver_data set operations

PATCH In review William Breathitt Gray 2 participants 11 messages Jan 30, 2017 – Feb 1, 2017

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

cover gpio: Remove unnecessary driver_data set operations

In a previous patchset ("gpio: Utilize devm_ functions in driver probe callbacks") the device remove functions for several drivers were removed as no longer necessary due to the patchset changes within. Setting driver_data had been necessary in these drivers in order to access private data in the respective device remove function. Now that the device remove functions are gone, setting driver_data is no longer necessary for these drivers. This patchset removes the relevant code.

William Breathitt Gray (5):
gpio: 104-dio-48e: Remove unnecessary driver_data set
gpio: 104-idi-48: Remove unnecessary driver_data set
gpio: 104-idio-16: Remove unnecessary driver_data set
gpio: gpio-mm: Remove unnecessary driver_data set
gpio: ws16c48: Remove unnecessary driver_data set

 drivers/gpio/gpio-104-dio-48e.c | 2 --
 drivers/gpio/gpio-104-idi-48.c  | 2 --
 drivers/gpio/gpio-104-idio-16.c | 2 --
 drivers/gpio/gpio-gpio-mm.c     | 2 --
 drivers/gpio/gpio-ws16c48.c     | 2 --
 5 files changed, 10 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/5 gpio: 104-dio-48e: Remove unnecessary driver_data set

Setting driver_data was necessary to access private data in the dio48e_remove function. Now that the dio48e_remove function is gone, driver_data is no longer used. This patch removes the relevant code.

---
 drivers/gpio/gpio-104-dio-48e.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-104-dio-48e.c +0 -2
index 221243f17d4e..b6b0378166c4 100644
@@ -369,8 +369,6 @@ static int dio48e_probe(struct device *dev, unsigned int id)
 
 	spin_lock_init(&dio48egpio->lock);
 
-	dev_set_drvdata(dev, dio48egpio);
-
 	err = devm_gpiochip_add_data(dev, &dio48egpio->chip, dio48egpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
Signature · 1 line
2.11.0
#3 lore raw

PATCH 2/5 gpio: 104-idi-48: Remove unnecessary driver_data set

In reply to William Breathitt Gray

Setting driver_data was necessary to access private data in the idi_48_remove function. Now that the idi_48_remove function is gone, driver_data is no longer used. This patch removes the relevant code.

---
 drivers/gpio/gpio-104-idi-48.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-104-idi-48.c +0 -2
index eafbf053f3e8..dc100dff6e13 100644
@@ -246,8 +246,6 @@ static int idi_48_probe(struct device *dev, unsigned int id)
 	spin_lock_init(&idi48gpio->lock);
 	spin_lock_init(&idi48gpio->ack_lock);
 
-	dev_set_drvdata(dev, idi48gpio);
-
 	err = devm_gpiochip_add_data(dev, &idi48gpio->chip, idi48gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
Signature · 1 line
2.11.0
#5 lore raw

PATCH 3/5 gpio: 104-idio-16: Remove unnecessary driver_data set

In reply to William Breathitt Gray

Setting driver_data was necessary to access private data in the idio_16_remove function. Now that the idio_16_remove function is gone, driver_data is no longer used. This patch removes the relevant code.

---
 drivers/gpio/gpio-104-idio-16.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-104-idio-16.c +0 -2
index 01a091e17614..67068b61b90b 100644
@@ -242,8 +242,6 @@ static int idio_16_probe(struct device *dev, unsigned int id)
 
 	spin_lock_init(&idio16gpio->lock);
 
-	dev_set_drvdata(dev, idio16gpio);
-
 	err = devm_gpiochip_add_data(dev, &idio16gpio->chip, idio16gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
Signature · 1 line
2.11.0
#7 lore raw

PATCH 4/5 gpio: gpio-mm: Remove unnecessary driver_data set

In reply to William Breathitt Gray

Setting driver_data was necessary to access private data in the gpiomm_remove function. Now that the gpiomm_remove function is gone, driver_data is no longer used. This patch removes the relevant code.

---
 drivers/gpio/gpio-gpio-mm.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-gpio-mm.c +0 -2
index 393c8f9cf30d..60017425b49f 100644
@@ -261,8 +261,6 @@ static int gpiomm_probe(struct device *dev, unsigned int id)
 
 	spin_lock_init(&gpiommgpio->lock);
 
-	dev_set_drvdata(dev, gpiommgpio);
-
 	err = devm_gpiochip_add_data(dev, &gpiommgpio->chip, gpiommgpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
Signature · 1 line
2.11.0
#9 lore raw

PATCH 5/5 gpio: ws16c48: Remove unnecessary driver_data set

In reply to William Breathitt Gray

Setting driver_data was necessary to access private data in the ws16c48_remove function. Now that the ws16c48_remove function is gone, driver_data is no longer used. This patch removes the relevant code.

---
 drivers/gpio/gpio-ws16c48.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-ws16c48.c +0 -2
index 65de20dfbe7a..48b35589b7d6 100644
@@ -372,8 +372,6 @@ static int ws16c48_probe(struct device *dev, unsigned int id)
 
 	spin_lock_init(&ws16c48gpio->lock);
 
-	dev_set_drvdata(dev, ws16c48gpio);
-
 	err = devm_gpiochip_add_data(dev, &ws16c48gpio->chip, ws16c48gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
Signature · 1 line
2.11.0