From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] delkin_cb: set proper hwif->gendev.parent value
Date: Mon, 02 Jun 2008 22:23:09 +0200 [thread overview]
Message-ID: <20080602202309.7265.47071.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080602202253.7265.23590.sendpatchset@localhost.localdomain>
hwif->dev was set too late (after ide_device_add() call)
so hwif->gendev.parent was not initialized properly.
Fix it by setting hw.dev and letting ide_init_port_hw()
do the rest.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/delkin_cb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/delkin_cb.c
===================================================================
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -79,6 +79,7 @@ delkin_cb_probe (struct pci_dev *dev, co
memset(&hw, 0, sizeof(hw));
ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
hw.irq = dev->irq;
+ hw.dev = &dev->dev;
hw.chipset = ide_pci; /* this enables IRQ sharing */
hwif = ide_find_port();
@@ -98,7 +99,7 @@ delkin_cb_probe (struct pci_dev *dev, co
goto out_disable;
pci_set_drvdata(dev, hwif);
- hwif->dev = &dev->dev;
+
drive = &hwif->drives[0];
if (drive->present) {
drive->io_32bit = 1;
next prev parent reply other threads:[~2008-06-02 20:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 20:22 [PATCH 1/9] ide: fix host drivers missing hwif->chipset initialization Bartlomiej Zolnierkiewicz
2008-06-02 20:23 ` [PATCH 2/9] ide: set hwif->dev in ide_init_port_hw() Bartlomiej Zolnierkiewicz
2008-06-02 20:23 ` Bartlomiej Zolnierkiewicz [this message]
2008-06-04 9:41 ` [PATCH 3/9] delkin_cb: set proper hwif->gendev.parent value Sergei Shtylyov
2008-06-02 20:23 ` [PATCH 4/9] delkin_cb: use struct ide_port_info Bartlomiej Zolnierkiewicz
2008-06-02 20:23 ` [PATCH 5/9] delkin_cb: add warm-plug support Bartlomiej Zolnierkiewicz
2008-06-02 20:23 ` [PATCH 6/9] delkin_cb: add missing __init/__exit tags Bartlomiej Zolnierkiewicz
2008-06-04 9:42 ` Sergei Shtylyov
2008-06-02 20:23 ` [PATCH 7/9] au1xxx-ide: don't use hwif->hwif_data Bartlomiej Zolnierkiewicz
2008-06-04 9:43 ` Sergei Shtylyov
2008-06-02 20:23 ` [PATCH 8/9] ide_4drives: use struct ide_port_info Bartlomiej Zolnierkiewicz
2008-06-02 20:24 ` [PATCH 9/9] ide-cs: " Bartlomiej Zolnierkiewicz
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=20080602202309.7265.47071.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).