From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH 9/21] ide: kill probe_hwif_init()
Date: Sun, 18 Nov 2007 23:21:02 +0100 [thread overview]
Message-ID: <200711182321.02732.bzolnier@gmail.com> (raw)
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-probe.c | 38 +++++++++++++++++---------------------
1 file changed, 17 insertions(+), 21 deletions(-)
Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -855,25 +855,6 @@ static void probe_hwif(ide_hwif_t *hwif)
}
}
-static int hwif_init(ide_hwif_t *hwif);
-static void hwif_register_devices(ide_hwif_t *hwif);
-
-static int probe_hwif_init(ide_hwif_t *hwif)
-{
- probe_hwif(hwif);
-
- if (!hwif_init(hwif)) {
- printk(KERN_INFO "%s: failed to initialize IDE interface\n",
- hwif->name);
- return -1;
- }
-
- if (hwif->present)
- hwif_register_devices(hwif);
-
- return 0;
-}
-
#if MAX_HWIFS > 1
/*
* save_match() is used to simplify logic in init_irq() below.
@@ -1401,11 +1382,26 @@ EXPORT_SYMBOL_GPL(ideprobe_init);
int ide_device_add(u8 idx[4])
{
+ ide_hwif_t *hwif;
int i, rc = 0;
for (i = 0; i < 4; i++) {
- if (idx[i] != 0xff)
- rc |= probe_hwif_init(&ide_hwifs[idx[i]]);
+ if (idx[i] == 0xff)
+ continue;
+
+ hwif = &ide_hwifs[idx[i]];
+
+ probe_hwif(hwif);
+
+ if (hwif_init(hwif) == 0) {
+ printk(KERN_INFO "%s: failed to initialize IDE "
+ "interface\n", hwif->name);
+ rc = -1;
+ continue;
+ }
+
+ if (hwif->present)
+ hwif_register_devices(hwif);
}
for (i = 0; i < 4; i++) {
next reply other threads:[~2007-11-18 22:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-18 22:21 Bartlomiej Zolnierkiewicz [this message]
2007-12-07 16:41 ` [PATCH 9/21] ide: kill probe_hwif_init() Sergei Shtylyov
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=200711182321.02732.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).