Re: [patch -mm 14/20] chardev: GPIO for SCx200 & PC-8736x: addplatform_device for use w dev_dbg
From: Andrew Morton
Date: Tue Jun 20 2006 - 01:22:09 EST
On Sat, 17 Jun 2006 12:35:43 -0600
Jim Cromie <jim.cromie@xxxxxxxxx> wrote:
> 14/20. patch.pdev-pc8736x
>
> Adds platform-device to (just introduced) driver, and uses it to
> replace many printks with dev_dbg() etc. This could trivially be
> merged into previous patch, but this way matches better with the
> corresponding patch that does the same change to scx200_gpio.
>
>
> static int __init pc8736x_gpio_init(void)
> {
> int r, rc;
>
> - printk(KERN_DEBUG NAME " initializing\n");
> + pdev = platform_device_alloc(DEVNAME, 0);
> + if (!pdev)
> + return -ENOMEM;
> +
> + rc = platform_device_add(pdev);
> + if (rc) {
> + platform_device_put(pdev);
> + return -ENODEV;
> + }
> + dev_info(&pdev->dev, "NatSemi pc8736x GPIO Driver Initializing\n");
The whitespace is all screwed up here. Use hard tabs.
It's simplest if I edit all the diffs.
<does that>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/