From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: 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 15:07:48 +0100 [thread overview]
Message-ID: <20081102140748.GA6399@isilmar.linta.de> (raw)
In-Reply-To: <ac3eb2510811020555r417a3b10xbadc9d87b0c3ea0a@mail.gmail.com>
Kay,
On Sun, Nov 02, 2008 at 02:55:46PM +0100, Kay Sievers wrote:
> 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,
it's in -pcmcia now.
> >> 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().
Ah, okay. Thanks.
Dominik
prev parent reply other threads:[~2008-11-02 14:07 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
2008-11-02 14:07 ` Dominik Brodowski [this message]
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=20081102140748.GA6399@isilmar.linta.de \
--to=linux@dominikbrodowski.net \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--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®