The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <syrjala@sci.fi>
To: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] w1-gpio: Add GPIO w1 bus master driver
Date: Thu, 3 Jan 2008 15:48:35 +0200	[thread overview]
Message-ID: <20080103134835.GM15861@sci.fi> (raw)
In-Reply-To: <20071226232454.039372b8@siona>

On Wed, Dec 26, 2007 at 11:24:54PM +0100, Haavard Skinnemoen wrote:
> 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?

id is 'int'. The bus_name won't include the id when -1 is used.

> > +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.

I was wondering what platform_driver_probe() was for but never bothered
to read the code. I'll change the code to use it.

I already sent an updated patch but forgot to send this reply.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

  reply	other threads:[~2008-01-03 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  7:34 [PATCH] w1-gpio: Add GPIO w1 bus master driver Ville Syrjala
2007-12-21 10:41 ` Evgeniy Polyakov
2007-12-21 12:42   ` Ville Syrjälä
2007-12-26 22:24 ` Haavard Skinnemoen
2008-01-03 13:48   ` Ville Syrjälä [this message]
2008-01-03 13:58     ` Haavard Skinnemoen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080103134835.GM15861@sci.fi \
    --to=syrjala@sci.fi \
    --cc=hskinnemoen@atmel.com \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox