lkml.org 
[lkml]   [2007]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] w1-gpio: Add GPIO w1 bus master driver
On Fri, 21 Dec 2007 09:34:01 +0200
Ville Syrjala <syrjala@sci.fi> wrote:

> +static struct platform_device foo_w1_device = {
> + .name = "w1-gpio",
> + .id = -1,

Assigning -1 to a u32 member isn't a very nice example. What does it
mean anyway?

> +static int __init w1_gpio_probe(struct platform_device *pdev)

This must be __devinit, or if you want to save a bit of memory...

> + .probe = w1_gpio_probe,

...remove this line, and...

> +static int __init w1_gpio_init(void)
> +{
> + return platform_driver_register(&w1_gpio_driver);

...call platform_driver_probe(&w1_gpio_driver, w1_gpio_probe) here.

Haavard


\
 
 \ /
  Last update: 2007-12-26 23:35    [from the cache]
©2003-2011 Jasper Spaans