Title: [6192] trunk/drivers/gpio: [#4375] ADP5520 Multifunction LCD Backlight and Keypad Input Device
- Revision
- 6192
- Author
- hennerich
- Date
- 2009-03-17 08:43:26 -0500 (Tue, 17 Mar 2009)
Log Message
[#4375] ADP5520 Multifunction LCD Backlight and Keypad Input Device
Driver
Fixups per Mike's suggestions
Modified Paths
Diff
Modified: trunk/drivers/gpio/Kconfig (6191 => 6192)
--- trunk/drivers/gpio/Kconfig 2009-03-17 13:38:07 UTC (rev 6191)
+++ trunk/drivers/gpio/Kconfig 2009-03-17 13:43:26 UTC (rev 6192)
@@ -148,6 +148,8 @@
help
This option enables support for on-chip GPIO found
on Analog Devices ADP5520 PMICs.
+ To compile this driver as a module, choose M here: the module will be
+ called adp5520-gpio.
comment "PCI GPIO expanders:"
Modified: trunk/drivers/gpio/adp5520-gpio.c (6191 => 6192)
--- trunk/drivers/gpio/adp5520-gpio.c 2009-03-17 13:38:07 UTC (rev 6191)
+++ trunk/drivers/gpio/adp5520-gpio.c 2009-03-17 13:43:26 UTC (rev 6192)
@@ -90,13 +90,17 @@
int ret, i, gpios;
unsigned char ctl_mask = 0;
- if (pdata == NULL)
- return 0;
+ if (pdata == NULL) {
+ dev_err(&pdev->dev, "missing platform data\n");
+ return -ENODEV;
+ }
- if (pdev->id != ID_ADP5520)
- return 0;
+ if (pdev->id != ID_ADP5520) {
+ dev_err(&pdev->dev, "only ADP5520 supports GPIO\n");
+ return -ENODEV;
+ }
- dev = kzalloc(sizeof(struct adp5520_gpio), GFP_KERNEL);
+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (dev == NULL) {
dev_err(&pdev->dev, "failed to alloc memory\n");
return -ENOMEM;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits