linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks
@ 2017-01-24 20:00 William Breathitt Gray
  2017-01-24 20:00 ` [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback William Breathitt Gray
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:00 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patchset takes advantage of the
resource manager functions and replaces gpiochip_add_data calls and
request_irq calls with devm_gpiochip_add_data calls and devm_request_irq
calls respectively.

A convenient outcome of these changes is the removal of the respective
driver remove callback functions for these drivers; now that clean-up is
handled automatically when devices are unbound, custom driver remove
functions are no longer necessary for these drivers.

William Breathitt Gray (5):
  gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback
  gpio: 104-idi-48: Utilize devm_ functions in driver probe callback
  gpio: 104-idio-16: Utilize devm_ functions in driver probe callback
  gpio: gpio-mm: Utilize devm_ functions in driver probe callback
  gpio: ws16c48: Utilize devm_ functions in driver probe callback

 drivers/gpio/gpio-104-dio-48e.c | 27 +++++----------------------
 drivers/gpio/gpio-104-idi-48.c  | 28 +++++-----------------------
 drivers/gpio/gpio-104-idio-16.c | 27 +++++----------------------
 drivers/gpio/gpio-gpio-mm.c     | 12 +-----------
 drivers/gpio/gpio-ws16c48.c     | 28 +++++-----------------------
 5 files changed, 21 insertions(+), 101 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
@ 2017-01-24 20:00 ` William Breathitt Gray
  2017-01-26 14:53   ` Linus Walleij
  2017-01-24 20:00 ` [PATCH 2/5] gpio: 104-idi-48: " William Breathitt Gray
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:00 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
request_irq call with the devm_gpiochip_add_data call and
devm_request_irq call respectively. In addition, the dio48e_remove
function has been removed as no longer necessary due to the use of the
relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/gpio/gpio-104-dio-48e.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c
index fcf776971ca9..b6d756b09979 100644
--- a/drivers/gpio/gpio-104-dio-48e.c
+++ b/drivers/gpio/gpio-104-dio-48e.c
@@ -48,7 +48,6 @@ MODULE_PARM_DESC(irq, "ACCES 104-DIO-48E interrupt line numbers");
  * @control:	Control registers state
  * @lock:	synchronization lock to prevent I/O race conditions
  * @base:	base port address of the GPIO device
- * @irq:	Interrupt line number
  * @irq_mask:	I/O bits affected by interrupts
  */
 struct dio48e_gpio {
@@ -58,7 +57,6 @@ struct dio48e_gpio {
 	unsigned char control[2];
 	spinlock_t lock;
 	unsigned base;
-	unsigned irq;
 	unsigned char irq_mask;
 };
 
@@ -329,13 +327,12 @@ static int dio48e_probe(struct device *dev, unsigned int id)
 	dio48egpio->chip.get = dio48e_gpio_get;
 	dio48egpio->chip.set = dio48e_gpio_set;
 	dio48egpio->base = base[id];
-	dio48egpio->irq = irq[id];
 
 	spin_lock_init(&dio48egpio->lock);
 
 	dev_set_drvdata(dev, dio48egpio);
 
-	err = gpiochip_add_data(&dio48egpio->chip, dio48egpio);
+	err = devm_gpiochip_add_data(dev, &dio48egpio->chip, dio48egpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
 		return err;
@@ -360,30 +357,17 @@ static int dio48e_probe(struct device *dev, unsigned int id)
 		handle_edge_irq, IRQ_TYPE_NONE);
 	if (err) {
 		dev_err(dev, "Could not add irqchip (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
-	err = request_irq(irq[id], dio48e_irq_handler, 0, name, dio48egpio);
+	err = devm_request_irq(dev, irq[id], dio48e_irq_handler, 0, name,
+		dio48egpio);
 	if (err) {
 		dev_err(dev, "IRQ handler registering failed (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
 	return 0;
-
-err_gpiochip_remove:
-	gpiochip_remove(&dio48egpio->chip);
-	return err;
-}
-
-static int dio48e_remove(struct device *dev, unsigned int id)
-{
-	struct dio48e_gpio *const dio48egpio = dev_get_drvdata(dev);
-
-	free_irq(dio48egpio->irq, dio48egpio);
-	gpiochip_remove(&dio48egpio->chip);
-
-	return 0;
 }
 
 static struct isa_driver dio48e_driver = {
@@ -391,7 +375,6 @@ static struct isa_driver dio48e_driver = {
 	.driver = {
 		.name = "104-dio-48e"
 	},
-	.remove = dio48e_remove
 };
 module_isa_driver(dio48e_driver, num_dio48e);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] gpio: 104-idi-48: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
  2017-01-24 20:00 ` [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback William Breathitt Gray
@ 2017-01-24 20:00 ` William Breathitt Gray
  2017-01-26 14:53   ` Linus Walleij
  2017-01-24 20:00 ` [PATCH 3/5] gpio: 104-idio-16: " William Breathitt Gray
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:00 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
request_irq call with the devm_gpiochip_add_data call and
devm_request_irq call respectively. In addition, the idi_48_remove
function has been removed as no longer necessary due to the use of the
relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/gpio/gpio-104-idi-48.c | 28 +++++-----------------------
 1 file changed, 5 insertions(+), 23 deletions(-)

diff --git a/drivers/gpio/gpio-104-idi-48.c b/drivers/gpio/gpio-104-idi-48.c
index 2d2763ea1a68..eafbf053f3e8 100644
--- a/drivers/gpio/gpio-104-idi-48.c
+++ b/drivers/gpio/gpio-104-idi-48.c
@@ -47,7 +47,6 @@ MODULE_PARM_DESC(irq, "ACCES 104-IDI-48 interrupt line numbers");
  * @ack_lock:	synchronization lock to prevent IRQ handler race conditions
  * @irq_mask:	input bits affected by interrupts
  * @base:	base port address of the GPIO device
- * @irq:	Interrupt line number
  * @cos_enb:	Change-Of-State IRQ enable boundaries mask
  */
 struct idi_48_gpio {
@@ -56,7 +55,6 @@ struct idi_48_gpio {
 	spinlock_t ack_lock;
 	unsigned char irq_mask[6];
 	unsigned base;
-	unsigned irq;
 	unsigned char cos_enb;
 };
 
@@ -244,14 +242,13 @@ static int idi_48_probe(struct device *dev, unsigned int id)
 	idi48gpio->chip.direction_input = idi_48_gpio_direction_input;
 	idi48gpio->chip.get = idi_48_gpio_get;
 	idi48gpio->base = base[id];
-	idi48gpio->irq = irq[id];
 
 	spin_lock_init(&idi48gpio->lock);
 	spin_lock_init(&idi48gpio->ack_lock);
 
 	dev_set_drvdata(dev, idi48gpio);
 
-	err = gpiochip_add_data(&idi48gpio->chip, idi48gpio);
+	err = devm_gpiochip_add_data(dev, &idi48gpio->chip, idi48gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
 		return err;
@@ -265,31 +262,17 @@ static int idi_48_probe(struct device *dev, unsigned int id)
 		handle_edge_irq, IRQ_TYPE_NONE);
 	if (err) {
 		dev_err(dev, "Could not add irqchip (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
-	err = request_irq(irq[id], idi_48_irq_handler, IRQF_SHARED, name,
-		idi48gpio);
+	err = devm_request_irq(dev, irq[id], idi_48_irq_handler, IRQF_SHARED,
+		name, idi48gpio);
 	if (err) {
 		dev_err(dev, "IRQ handler registering failed (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
 	return 0;
-
-err_gpiochip_remove:
-	gpiochip_remove(&idi48gpio->chip);
-	return err;
-}
-
-static int idi_48_remove(struct device *dev, unsigned int id)
-{
-	struct idi_48_gpio *const idi48gpio = dev_get_drvdata(dev);
-
-	free_irq(idi48gpio->irq, idi48gpio);
-	gpiochip_remove(&idi48gpio->chip);
-
-	return 0;
 }
 
 static struct isa_driver idi_48_driver = {
@@ -297,7 +280,6 @@ static struct isa_driver idi_48_driver = {
 	.driver = {
 		.name = "104-idi-48"
 	},
-	.remove = idi_48_remove
 };
 module_isa_driver(idi_48_driver, num_idi_48);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] gpio: 104-idio-16: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
  2017-01-24 20:00 ` [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback William Breathitt Gray
  2017-01-24 20:00 ` [PATCH 2/5] gpio: 104-idi-48: " William Breathitt Gray
@ 2017-01-24 20:00 ` William Breathitt Gray
  2017-01-26 14:54   ` Linus Walleij
  2017-01-24 20:01 ` [PATCH 4/5] gpio: gpio-mm: " William Breathitt Gray
  2017-01-24 20:01 ` [PATCH 5/5] gpio: ws16c48: " William Breathitt Gray
  4 siblings, 1 reply; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:00 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
request_irq call with the devm_gpiochip_add_data call and
devm_request_irq call respectively. In addition, the idio_16_remove
function has been removed as no longer necessary due to the use of the
relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/gpio/gpio-104-idio-16.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c
index 6787b8fcf0d8..277e52b56a39 100644
--- a/drivers/gpio/gpio-104-idio-16.c
+++ b/drivers/gpio/gpio-104-idio-16.c
@@ -46,7 +46,6 @@ MODULE_PARM_DESC(irq, "ACCES 104-IDIO-16 interrupt line numbers");
  * @lock:	synchronization lock to prevent I/O race conditions
  * @irq_mask:	I/O bits affected by interrupts
  * @base:	base port address of the GPIO device
- * @irq:	Interrupt line number
  * @out_state:	output bits state
  */
 struct idio_16_gpio {
@@ -54,7 +53,6 @@ struct idio_16_gpio {
 	spinlock_t lock;
 	unsigned long irq_mask;
 	unsigned base;
-	unsigned irq;
 	unsigned out_state;
 };
 
@@ -220,14 +218,13 @@ static int idio_16_probe(struct device *dev, unsigned int id)
 	idio16gpio->chip.get = idio_16_gpio_get;
 	idio16gpio->chip.set = idio_16_gpio_set;
 	idio16gpio->base = base[id];
-	idio16gpio->irq = irq[id];
 	idio16gpio->out_state = 0xFFFF;
 
 	spin_lock_init(&idio16gpio->lock);
 
 	dev_set_drvdata(dev, idio16gpio);
 
-	err = gpiochip_add_data(&idio16gpio->chip, idio16gpio);
+	err = devm_gpiochip_add_data(dev, &idio16gpio->chip, idio16gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
 		return err;
@@ -241,30 +238,17 @@ static int idio_16_probe(struct device *dev, unsigned int id)
 		handle_edge_irq, IRQ_TYPE_NONE);
 	if (err) {
 		dev_err(dev, "Could not add irqchip (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
-	err = request_irq(irq[id], idio_16_irq_handler, 0, name, idio16gpio);
+	err = devm_request_irq(dev, irq[id], idio_16_irq_handler, 0, name,
+		idio16gpio);
 	if (err) {
 		dev_err(dev, "IRQ handler registering failed (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
 	return 0;
-
-err_gpiochip_remove:
-	gpiochip_remove(&idio16gpio->chip);
-	return err;
-}
-
-static int idio_16_remove(struct device *dev, unsigned int id)
-{
-	struct idio_16_gpio *const idio16gpio = dev_get_drvdata(dev);
-
-	free_irq(idio16gpio->irq, idio16gpio);
-	gpiochip_remove(&idio16gpio->chip);
-
-	return 0;
 }
 
 static struct isa_driver idio_16_driver = {
@@ -272,7 +256,6 @@ static struct isa_driver idio_16_driver = {
 	.driver = {
 		.name = "104-idio-16"
 	},
-	.remove = idio_16_remove
 };
 
 module_isa_driver(idio_16_driver, num_idio_16);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] gpio: gpio-mm: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
                   ` (2 preceding siblings ...)
  2017-01-24 20:00 ` [PATCH 3/5] gpio: 104-idio-16: " William Breathitt Gray
@ 2017-01-24 20:01 ` William Breathitt Gray
  2017-01-26 14:55   ` Linus Walleij
  2017-01-24 20:01 ` [PATCH 5/5] gpio: ws16c48: " William Breathitt Gray
  4 siblings, 1 reply; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:01 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call with
the devm_gpiochip_add_data call. In addition, the gpiomm_remove function
has been removed as no longer necessary due to the use of the relevant
devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/gpio/gpio-gpio-mm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpio/gpio-gpio-mm.c b/drivers/gpio/gpio-gpio-mm.c
index 1e7def9449ce..c2837ce64ea3 100644
--- a/drivers/gpio/gpio-gpio-mm.c
+++ b/drivers/gpio/gpio-gpio-mm.c
@@ -224,7 +224,7 @@ static int gpiomm_probe(struct device *dev, unsigned int id)
 
 	dev_set_drvdata(dev, gpiommgpio);
 
-	err = gpiochip_add_data(&gpiommgpio->chip, gpiommgpio);
+	err = devm_gpiochip_add_data(dev, &gpiommgpio->chip, gpiommgpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
 		return err;
@@ -243,21 +243,11 @@ static int gpiomm_probe(struct device *dev, unsigned int id)
 	return 0;
 }
 
-static int gpiomm_remove(struct device *dev, unsigned int id)
-{
-	struct gpiomm_gpio *const gpiommgpio = dev_get_drvdata(dev);
-
-	gpiochip_remove(&gpiommgpio->chip);
-
-	return 0;
-}
-
 static struct isa_driver gpiomm_driver = {
 	.probe = gpiomm_probe,
 	.driver = {
 		.name = "gpio-mm"
 	},
-	.remove = gpiomm_remove
 };
 
 module_isa_driver(gpiomm_driver, num_gpiomm);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] gpio: ws16c48: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
                   ` (3 preceding siblings ...)
  2017-01-24 20:01 ` [PATCH 4/5] gpio: gpio-mm: " William Breathitt Gray
@ 2017-01-24 20:01 ` William Breathitt Gray
  2017-01-26 14:57   ` Linus Walleij
  4 siblings, 1 reply; 11+ messages in thread
From: William Breathitt Gray @ 2017-01-24 20:01 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel, William Breathitt Gray

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
request_irq call with the devm_gpiochip_add_data call and
devm_request_irq call respectively. In addition, the ws16c48_remove
function has been removed as no longer necessary due to the use of the
relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/gpio/gpio-ws16c48.c | 28 +++++-----------------------
 1 file changed, 5 insertions(+), 23 deletions(-)

diff --git a/drivers/gpio/gpio-ws16c48.c b/drivers/gpio/gpio-ws16c48.c
index eaa71d440ccf..66129355e3a3 100644
--- a/drivers/gpio/gpio-ws16c48.c
+++ b/drivers/gpio/gpio-ws16c48.c
@@ -46,7 +46,6 @@ MODULE_PARM_DESC(irq, "WinSystems WS16C48 interrupt line numbers");
  * @irq_mask:	I/O bits affected by interrupts
  * @flow_mask:	IRQ flow type mask for the respective I/O bits
  * @base:	base port address of the GPIO device
- * @irq:	Interrupt line number
  */
 struct ws16c48_gpio {
 	struct gpio_chip chip;
@@ -56,7 +55,6 @@ struct ws16c48_gpio {
 	unsigned long irq_mask;
 	unsigned long flow_mask;
 	unsigned base;
-	unsigned irq;
 };
 
 static int ws16c48_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
@@ -330,13 +328,12 @@ static int ws16c48_probe(struct device *dev, unsigned int id)
 	ws16c48gpio->chip.get = ws16c48_gpio_get;
 	ws16c48gpio->chip.set = ws16c48_gpio_set;
 	ws16c48gpio->base = base[id];
-	ws16c48gpio->irq = irq[id];
 
 	spin_lock_init(&ws16c48gpio->lock);
 
 	dev_set_drvdata(dev, ws16c48gpio);
 
-	err = gpiochip_add_data(&ws16c48gpio->chip, ws16c48gpio);
+	err = devm_gpiochip_add_data(dev, &ws16c48gpio->chip, ws16c48gpio);
 	if (err) {
 		dev_err(dev, "GPIO registering failed (%d)\n", err);
 		return err;
@@ -353,31 +350,17 @@ static int ws16c48_probe(struct device *dev, unsigned int id)
 		handle_edge_irq, IRQ_TYPE_NONE);
 	if (err) {
 		dev_err(dev, "Could not add irqchip (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
-	err = request_irq(irq[id], ws16c48_irq_handler, IRQF_SHARED, name,
-		ws16c48gpio);
+	err = devm_request_irq(dev, irq[id], ws16c48_irq_handler, IRQF_SHARED,
+		name, ws16c48gpio);
 	if (err) {
 		dev_err(dev, "IRQ handler registering failed (%d)\n", err);
-		goto err_gpiochip_remove;
+		return err;
 	}
 
 	return 0;
-
-err_gpiochip_remove:
-	gpiochip_remove(&ws16c48gpio->chip);
-	return err;
-}
-
-static int ws16c48_remove(struct device *dev, unsigned int id)
-{
-	struct ws16c48_gpio *const ws16c48gpio = dev_get_drvdata(dev);
-
-	free_irq(ws16c48gpio->irq, ws16c48gpio);
-	gpiochip_remove(&ws16c48gpio->chip);
-
-	return 0;
 }
 
 static struct isa_driver ws16c48_driver = {
@@ -385,7 +368,6 @@ static struct isa_driver ws16c48_driver = {
 	.driver = {
 		.name = "ws16c48"
 	},
-	.remove = ws16c48_remove
 };
 
 module_isa_driver(ws16c48_driver, num_ws16c48);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 ` [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback William Breathitt Gray
@ 2017-01-26 14:53   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2017-01-26 14:53 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: Alexandre Courbot, linux-gpio, linux-kernel

On Tue, Jan 24, 2017 at 9:00 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:

> The devm_ resource manager functions allow memory to be automatically
> released when a device is unbound. This patch takes advantage of the
> resource manager functions and replaces the gpiochip_add_data call and
> request_irq call with the devm_gpiochip_add_data call and
> devm_request_irq call respectively. In addition, the dio48e_remove
> function has been removed as no longer necessary due to the use of the
> relevant devm_ resource manager functions.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] gpio: 104-idi-48: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 ` [PATCH 2/5] gpio: 104-idi-48: " William Breathitt Gray
@ 2017-01-26 14:53   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2017-01-26 14:53 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: Alexandre Courbot, linux-gpio, linux-kernel

On Tue, Jan 24, 2017 at 9:00 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:

> The devm_ resource manager functions allow memory to be automatically
> released when a device is unbound. This patch takes advantage of the
> resource manager functions and replaces the gpiochip_add_data call and
> request_irq call with the devm_gpiochip_add_data call and
> devm_request_irq call respectively. In addition, the idi_48_remove
> function has been removed as no longer necessary due to the use of the
> relevant devm_ resource manager functions.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/5] gpio: 104-idio-16: Utilize devm_ functions in driver probe callback
  2017-01-24 20:00 ` [PATCH 3/5] gpio: 104-idio-16: " William Breathitt Gray
@ 2017-01-26 14:54   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2017-01-26 14:54 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: Alexandre Courbot, linux-gpio, linux-kernel

On Tue, Jan 24, 2017 at 9:00 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:

> The devm_ resource manager functions allow memory to be automatically
> released when a device is unbound. This patch takes advantage of the
> resource manager functions and replaces the gpiochip_add_data call and
> request_irq call with the devm_gpiochip_add_data call and
> devm_request_irq call respectively. In addition, the idio_16_remove
> function has been removed as no longer necessary due to the use of the
> relevant devm_ resource manager functions.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/5] gpio: gpio-mm: Utilize devm_ functions in driver probe callback
  2017-01-24 20:01 ` [PATCH 4/5] gpio: gpio-mm: " William Breathitt Gray
@ 2017-01-26 14:55   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2017-01-26 14:55 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: Alexandre Courbot, linux-gpio, linux-kernel

On Tue, Jan 24, 2017 at 9:01 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:

> The devm_ resource manager functions allow memory to be automatically
> released when a device is unbound. This patch takes advantage of the
> resource manager functions and replaces the gpiochip_add_data call with
> the devm_gpiochip_add_data call. In addition, the gpiomm_remove function
> has been removed as no longer necessary due to the use of the relevant
> devm_ resource manager functions.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/5] gpio: ws16c48: Utilize devm_ functions in driver probe callback
  2017-01-24 20:01 ` [PATCH 5/5] gpio: ws16c48: " William Breathitt Gray
@ 2017-01-26 14:57   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2017-01-26 14:57 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: Alexandre Courbot, linux-gpio, linux-kernel

On Tue, Jan 24, 2017 at 9:01 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:

> The devm_ resource manager functions allow memory to be automatically
> released when a device is unbound. This patch takes advantage of the
> resource manager functions and replaces the gpiochip_add_data call and
> request_irq call with the devm_gpiochip_add_data call and
> devm_request_irq call respectively. In addition, the ws16c48_remove
> function has been removed as no longer necessary due to the use of the
> relevant devm_ resource manager functions.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-01-26 14:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 20:00 [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks William Breathitt Gray
2017-01-24 20:00 ` [PATCH 1/5] gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback William Breathitt Gray
2017-01-26 14:53   ` Linus Walleij
2017-01-24 20:00 ` [PATCH 2/5] gpio: 104-idi-48: " William Breathitt Gray
2017-01-26 14:53   ` Linus Walleij
2017-01-24 20:00 ` [PATCH 3/5] gpio: 104-idio-16: " William Breathitt Gray
2017-01-26 14:54   ` Linus Walleij
2017-01-24 20:01 ` [PATCH 4/5] gpio: gpio-mm: " William Breathitt Gray
2017-01-26 14:55   ` Linus Walleij
2017-01-24 20:01 ` [PATCH 5/5] gpio: ws16c48: " William Breathitt Gray
2017-01-26 14:57   ` Linus Walleij

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).