Skip to contentSkip to conversation

gpio: rdc321x: Prevent removal of modules exporting active GPIOs

PATCH Applied Axel Lin 2 participants 2 messages Sep 1, 2012 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 gpio: rdc321x: Prevent removal of modules exporting active GPIOs

This driver can be built as a module, set the missing owner field of struct gpio_chip to prevent removal of modules exporting active GPIOs.

---
 drivers/gpio/gpio-rdc321x.c |    1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-rdc321x.c +1 -0
index e97016a..b62d443 100644
@@ -170,6 +170,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
 	rdc321x_gpio_dev->reg2_data_base = r->start + 0x4;
 
 	rdc321x_gpio_dev->chip.label = "rdc321x-gpio";
+	rdc321x_gpio_dev->chip.owner = THIS_MODULE;
 	rdc321x_gpio_dev->chip.direction_input = rdc_gpio_direction_input;
 	rdc321x_gpio_dev->chip.direction_output = rdc_gpio_config;
 	rdc321x_gpio_dev->chip.get = rdc_gpio_get_value;
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · Axel Lin

This driver can be built as a module, set the missing owner field of struct gpio_chip to prevent removal of modules exporting active GPIOs.

Applied.

Thanks,
Linus Walleij