From f31000e573da052b6b8bcc21faff520b4e2eda7a Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Tue, 27 Jun 2006 02:54:23 -0700 Subject: [PATCH] chardev: GPIO for SCx200 & PC-8736x: use dev_dbg in common module Use of dev_dbg() and friends is considered good practice. dev_dbg() needs a struct device *devp, but nsc_gpio is only a helper module, so it doesnt have/need its own. To provide devp to the user-modules (scx200 & pc8736x _gpio), we add it to the vtable, and set it during init. Also squeeze nsc_gpio_dump()'s format a little. [ 199.259879] pc8736x_gpio.0: io09: 0x0044 TS OD PUE EDGE LO DEBOUNCE Signed-off-by: Jim Cromie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/pc8736x_gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/char/pc8736x_gpio.c') diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c index b16fbef816c..48ff1fc8b06 100644 --- a/drivers/char/pc8736x_gpio.c +++ b/drivers/char/pc8736x_gpio.c @@ -207,8 +207,6 @@ static void pc8736x_gpio_change(unsigned index) pc8736x_gpio_set(index, !pc8736x_gpio_get(index)); } -extern void nsc_gpio_dump(unsigned iminor); - static struct nsc_gpio_ops pc8736x_access = { .owner = THIS_MODULE, .gpio_config = pc8736x_gpio_configure, @@ -260,6 +258,7 @@ static int __init pc8736x_gpio_init(void) dev_err(&pdev->dev, "no device found\n"); goto undo_platform_dev_add; } + pc8736x_access.dev = &pdev->dev; /* Verify that chip and it's GPIO unit are both enabled. My BIOS does this, so I take minimum action here -- cgit v1.2.3-70-g09d2