From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Dominik Brodowski" <linux@dominikbrodowski.net>,
"Kay Sievers" <kay.sievers@vrfy.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Greg KH" <greg@kroah.com>
Subject: Re: pcmcia: struct device - replace bus_id with dev_name(), dev_set_name()
Date: Sun, 2 Nov 2008 14:55:46 +0100 [thread overview]
Message-ID: <ac3eb2510811020555r417a3b10xbadc9d87b0c3ea0a@mail.gmail.com> (raw)
In-Reply-To: <20081102121320.GA15349@comet.dominikbrodowski.net>
On Sun, Nov 2, 2008 at 13:13, Dominik Brodowski
<linux@dominikbrodowski.net> wrote:
> On Sat, Nov 01, 2008 at 11:46:06AM +0100, Kay Sievers wrote:
>> From: Kay Sievers <kay.sievers@vrfy.org>
>> Subject: pcmcia: struct device - replace bus_id with dev_name(), dev_set_name()
>>
>> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
>> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
>> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
>
> is this to go in via -pcmcia or via -driver-core?
Would be great if this goes through -pcmcia, and show up in -next
soon, so we can continue to address the rest of the tree in -next,
after the patches are merged from the subsystem trees.
>> diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
>> index c68c5d3..5d0e60e 100644
>> --- a/drivers/pcmcia/cs.c
>> +++ b/drivers/pcmcia/cs.c
>> @@ -226,7 +226,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
>> /* set proper values in socket->dev */
>> dev_set_drvdata(&socket->dev, socket);
>> socket->dev.class = &pcmcia_socket_class;
>> - snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock);
>> + dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock);
>
> In other places, you check for !dev_name() afterwards -- why not here?
The name is used in the line just below setting it, which is why we
need to check that it is not NULL. The other case, like in almost all
other cases, the unlikely event of failing to set the name is handled
by a failing call to device_register().
Thanks,
Kay
next prev parent reply other threads:[~2008-11-02 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-01 10:46 Kay Sievers
2008-11-02 12:13 ` Dominik Brodowski
2008-11-02 13:55 ` Kay Sievers [this message]
2008-11-02 14:07 ` Dominik Brodowski
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=ac3eb2510811020555r417a3b10xbadc9d87b0c3ea0a@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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®