lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071226232454.039372b8@siona>
Date:	Wed, 26 Dec 2007 23:24:54 +0100
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	Ville Syrjala <syrjala@....fi>
Cc:	Evgeniy Polyakov <johnpol@....mipt.ru>,
	linux-kernel@...r.kernel.org, Ville Syrjala <syrjala@....fi>
Subject: Re: [PATCH] w1-gpio: Add GPIO w1 bus master driver

On Fri, 21 Dec 2007 09:34:01 +0200
Ville Syrjala <syrjala@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ