![]() | |||||||||||
Messages in this thread |
On Sat, 17 Jun 2006 12:35:43 -0600
Jim Cromie <jim.cromie@gmail.com> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||
| Last update: 2006-06-20 07:26 [from the cache] ©2003-2008 | |||||||||||