From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Drew Moseley" <dmoseley@mvista.com>
Cc: ambx1@neo.rr.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Create PNP device attributes via dev_attrs field of struct device
Date: Wed, 24 Sep 2008 12:03:39 -0700 [thread overview]
Message-ID: <3ae72650809241203o41b62a10m31377887d44fd05e@mail.gmail.com> (raw)
In-Reply-To: <48DA774A.9010206@mvista.com>
On Wed, Sep 24, 2008 at 10:22, Drew Moseley <dmoseley@mvista.com> wrote:
> Kay Sievers wrote:
>>
>> Any reason not to assign it statically to pnp_bus_type at in
>> drivers/pnp/driver.c?
> Not really but since everything in the dev_attrs array is statically
> defined in interface.c it was simpler to implement it this way. To
> assign it in driver.c, the array can be made non-static and an extern
> added in driver.c, or the array definition can be moved to driver.c and
> all the set and show functions be made non-static. Is there a preference?
Yeah, it looks weird to mangle the bus_type values from a device
routine, and set the same value again and again with every device
creation. Just declare the array non-static, if moving the code around
between files does not allow a static declaration.
Thanks,
Kay
next prev parent reply other threads:[~2008-09-24 19:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 21:24 Drew Moseley
2008-09-24 4:59 ` Kay Sievers
2008-09-24 17:22 ` Drew Moseley
2008-09-24 19:03 ` Kay Sievers [this message]
2008-09-24 19:37 ` Drew Moseley
2008-09-25 10:13 ` Kay Sievers
2008-09-25 16:42 ` Drew Moseley
2008-09-27 23:31 ` Kay Sievers
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=3ae72650809241203o41b62a10m31377887d44fd05e@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=ambx1@neo.rr.com \
--cc=dmoseley@mvista.com \
--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
all inboxes | Powered by JetHome®