From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Mikael Starvik <starvik@axis.com>
Subject: [PATCH 7/21] ide-cris: don't override ide_register_hw() result
Date: Sun, 18 Nov 2007 23:19:02 +0100 [thread overview]
Message-ID: <200711182319.02460.bzolnier@gmail.com> (raw)
* Don't override ide_register_hw() result and check if there is a hwif
available to use.
* MAX_HWIFS is user configurable nowadays so replace it by hard-coded value.
* Remove the comment about ide_hwifs[].
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/cris/ide-cris.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: b/drivers/ide/cris/ide-cris.c
===================================================================
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -770,15 +770,16 @@ init_e100_ide (void)
/* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */
ide_offsets[IDE_CONTROL_OFFSET] = cris_ide_reg_addr(6, 1, 0);
- /* first fill in some stuff in the ide_hwifs fields */
+ for (h = 0; h < 4; h++) {
+ ide_hwif_t *hwif = NULL;
- for(h = 0; h < MAX_HWIFS; h++) {
- ide_hwif_t *hwif = &ide_hwifs[h];
ide_setup_ports(&hw, cris_ide_base_address(h),
ide_offsets,
0, 0, cris_ide_ack_intr,
ide_default_irq(0));
ide_register_hw(&hw, NULL, 1, &hwif);
+ if (hwif == NULL)
+ continue;
hwif->mmio = 1;
hwif->chipset = ide_etrax100;
hwif->set_pio_mode = &cris_set_pio_mode;
next reply other threads:[~2007-11-18 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-18 22:19 Bartlomiej Zolnierkiewicz [this message]
2007-11-27 12:58 ` [PATCH 7/21] ide-cris: don't override ide_register_hw() result Sergei Shtylyov
[not found] <BFECAF9E178F144FAEF2BF4CE739C668055FDB15@exmail1.se.axis.com>
2007-11-27 13:18 ` Mikael Starvik
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=200711182319.02460.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=starvik@axis.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.