On Sat, 17 Jun 2006 12:35:43 -0600
Jim Cromie <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]