Messages in this thread | | | From | Mike Frysinger <> | Date | Tue, 28 Sep 2010 10:55:26 -0400 | Subject | Re: [MeeGo-Dev][PATCH v2] Topcliff: Update PCH_GPIO driver to 2.6.35 |
| |
On Tue, Sep 28, 2010 at 05:37, Masayuki Ohtak wrote: > --- a/drivers/gpio/Kconfig > +++ b/drivers/gpio/Kconfig > > comment "I2C GPIO expanders:" > > +config PCH_GPIO > + tristate "PCH GPIO" > + depends on PCI
this is connected to a PCI bus, not I2C, so it shouldnt be under the I2C comment. move it to a diff place in the file.
> --- a/drivers/gpio/Makefile > +++ b/drivers/gpio/Makefile > @@ -35,3 +35,4 @@ obj-$(CONFIG_GPIO_WM8994) += wm8994-gpio.o > obj-$(CONFIG_GPIO_SCH) += sch_gpio.o > obj-$(CONFIG_GPIO_RDC321X) += rdc321x-gpio.o > obj-$(CONFIG_GPIO_JANZ_TTL) += janz-ttl.o > +obj-$(CONFIG_PCH_GPIO) += pch_gpio.o
there is a clear standard of naming things CONFIG_GPIO_XXX, so i'd change your CONFIG_PCH_GPIO to CONFIG_GPIO_PCH
> +#include <linux/cdev.h>
you dont actually use cdev anywhere. punt the header.
> +#define MODULE_NAME "pch_gpio"
KBUILD_MODNAME already exists
> +#define PCI_DEVICE_ID_PCH_GPIO 0x8803
considering you use this define in one place, i dont see why you need a define at all. just put the id in the one structure.
> +#ifdef CONFIG_PM > +static s32 pch_gpio_suspend(struct pci_dev *pdev, pm_message_t state) > +static s32 pch_gpio_resume(struct pci_dev *pdev)
suspend/resume funcs return "int", not "s32"
> +static struct pci_device_id pch_gpio_pcidev_id[] = {
should be const
> +static s32 __devinit pch_gpio_probe(struct pci_dev *pdev, > + const struct pci_device_id *id)
return value is "int", not "s32"
> + chip = kzalloc(sizeof(struct pch_gpio_chip), GFP_KERNEL);
sizeof(*chip)
> + printk(KERN_ERR "PCH gpio: Failed to register GPIO\n");
use dev_err()
> +static s32 __init pch_gpio_pci_init(void) > +{ > + return pci_register_driver(&pch_gpio_driver); > +} > +module_init(pch_gpio_pci_init);
module_init funcs return "int", not "s32" -mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |