cmd646: pass pci_dev as it needs it
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Thu, 22 Apr 2010 21:54:45 +0000 (01:54 +0400)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 1 May 2010 19:44:43 +0000 (19:44 +0000)
commita2ee96eac0cca1c100eb006953c6b3b53d0b2d84
tree3a8aa8c27ce6c8e7560e9cbdb7e27d0ec6f0db66
parentdb6a9195d57a2d9c4a8690ed1c75779d3f44f4f8
cmd646: pass pci_dev as it needs it

Instead of doing tricks to get the pci_dev, just pass it in the 1st
place.  Patch is a bit longer that reverting the pci_dev field, but it
states more clearly (IMHO) what we are doing.

It also fixes the bm test, now that you told me that ->unit is not
always valid.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/ide/cmd646.c
hw/ide/internal.h
hw/ide/piix.c