From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Frans Pop <elendil@planet.nl>
Cc: linux-kernel@vger.kernel.org, dbrownell@users.sourceforge.net,
linux-pcmcia@lists.infradead.org
Subject: Re: [PATCH] pcmcia: ensure correct logging in do_io_probe [v2]
Date: Sun, 9 Nov 2008 22:28:49 +0100 [thread overview]
Message-ID: <20081109212849.GA12584@isilmar.linta.de> (raw)
In-Reply-To: <200811071522.43618.elendil@planet.nl>
Hi,
On Fri, Nov 07, 2008 at 03:22:42PM +0100, Frans Pop wrote:
> I've added parens around the conditions. Maybe not strictly needed,
> but better readable and consistent with similar usage in cs.c.
>
> From: Frans Pop <elendil@planet.nl>
>
> pcmcia: ensure correct logging in do_io_probe
>
> During early probing of the parent PCI bridge I/O window no socket
> has been allocated yet.
> In that case print &s->cb_dev->dev instead of &s->dev as device.
similar to the other patch, this won't work: &skt->cb_dev is only available
and set if the parent device is a PCI device; therefore, &skt->dev is the
only thing we can use.
An alternative approach would be to move this initialization code only after
we've set dev_name. Could you test whether this approach works for you,
please?
Thanks,
Dominik
>From b1769450da0eeae2d95aae5496acbdf4c6ba89b2 Mon Sep 17 00:00:00 2001
From: Dominik Brodowski <linux@dominikbrodowski.net>
Date: Sun, 9 Nov 2008 21:47:47 +0100
Subject: [PATCH] pcmcia: ensure correct logging in do_io_probe
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 5d0e60e..0660ad1 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -186,12 +186,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
spin_lock_init(&socket->lock);
- if (socket->resource_ops->init) {
- ret = socket->resource_ops->init(socket);
- if (ret)
- return (ret);
- }
-
/* try to obtain a socket number [yes, it gets ugly if we
* register more than 2^sizeof(unsigned int) pcmcia
* sockets... but the socket number is deprecated
@@ -239,6 +233,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
mutex_init(&socket->skt_mutex);
spin_lock_init(&socket->thread_lock);
+ if (socket->resource_ops->init) {
+ ret = socket->resource_ops->init(socket);
+ if (ret)
+ goto err;
+ }
+
tsk = kthread_run(pccardd, socket, "pccardd");
if (IS_ERR(tsk)) {
ret = PTR_ERR(tsk);
next prev parent reply other threads:[~2008-11-09 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 14:22 [PATCH] pcmcia: ensure correct logging in do_io_probe [v2] Frans Pop
2008-11-09 21:28 ` Dominik Brodowski [this message]
2008-11-15 15:24 ` Frans Pop
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=20081109212849.GA12584@isilmar.linta.de \
--to=linux@dominikbrodowski.net \
--cc=dbrownell@users.sourceforge.net \
--cc=elendil@planet.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.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