aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorChristoph Lameter <christoph@lameter.com>2005-08-09 22:59:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-09 23:21:31 -0400
commit86b3786078d63242d3194ffc58ae8dae1d1bbef3 (patch)
tree518f62158f0923573decb8f072ac7282fb7575cb /include/linux/ide.h
parentaeb3f76350e78aba90653b563de6677b442d21d6 (diff)
[PATCH] Fix ide-disk.c oops caused by hwif == NULL
1. Move hwif_to_node to ide.h 2. Use hwif_to_node in ide-disk.c Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 92129078d4f3..a6dbb51ecd7b 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1501,4 +1501,10 @@ extern struct bus_type ide_bus_type;
1501#define ide_id_has_flush_cache_ext(id) \ 1501#define ide_id_has_flush_cache_ext(id) \
1502 (((id)->cfs_enable_2 & 0x2400) == 0x2400) 1502 (((id)->cfs_enable_2 & 0x2400) == 0x2400)
1503 1503
1504static inline int hwif_to_node(ide_hwif_t *hwif)
1505{
1506 struct pci_dev *dev = hwif->pci_dev;
1507 return dev ? pcibus_to_node(dev->bus) : -1;
1508}
1509
1504#endif /* _IDE_H */ 1510#endif /* _IDE_H */