diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-14 13:42:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-14 13:42:40 -0500 |
commit | 3e2b32b69308e974cd1167beaf266d3c716e4734 (patch) | |
tree | 0f1b24dcb7b066a6322d33235b95655d885695ac /drivers/ide/ide.c | |
parent | 3824ba7df91745da6ebac703c87c3b801c34fdd0 (diff) | |
parent | 9c08a938ce5a3e1c9d5f764dc6ae844cb1af76ff (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index ec5a4cb173b0..afeb02bbb722 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1949,10 +1949,41 @@ static int ide_uevent(struct device *dev, char **envp, int num_envp, | |||
1949 | return 0; | 1949 | return 0; |
1950 | } | 1950 | } |
1951 | 1951 | ||
1952 | static int generic_ide_probe(struct device *dev) | ||
1953 | { | ||
1954 | ide_drive_t *drive = to_ide_device(dev); | ||
1955 | ide_driver_t *drv = to_ide_driver(dev->driver); | ||
1956 | |||
1957 | return drv->probe ? drv->probe(drive) : -ENODEV; | ||
1958 | } | ||
1959 | |||
1960 | static int generic_ide_remove(struct device *dev) | ||
1961 | { | ||
1962 | ide_drive_t *drive = to_ide_device(dev); | ||
1963 | ide_driver_t *drv = to_ide_driver(dev->driver); | ||
1964 | |||
1965 | if (drv->remove) | ||
1966 | drv->remove(drive); | ||
1967 | |||
1968 | return 0; | ||
1969 | } | ||
1970 | |||
1971 | static void generic_ide_shutdown(struct device *dev) | ||
1972 | { | ||
1973 | ide_drive_t *drive = to_ide_device(dev); | ||
1974 | ide_driver_t *drv = to_ide_driver(dev->driver); | ||
1975 | |||
1976 | if (dev->driver && drv->shutdown) | ||
1977 | drv->shutdown(drive); | ||
1978 | } | ||
1979 | |||
1952 | struct bus_type ide_bus_type = { | 1980 | struct bus_type ide_bus_type = { |
1953 | .name = "ide", | 1981 | .name = "ide", |
1954 | .match = ide_bus_match, | 1982 | .match = ide_bus_match, |
1955 | .uevent = ide_uevent, | 1983 | .uevent = ide_uevent, |
1984 | .probe = generic_ide_probe, | ||
1985 | .remove = generic_ide_remove, | ||
1986 | .shutdown = generic_ide_shutdown, | ||
1956 | .dev_attrs = ide_dev_attrs, | 1987 | .dev_attrs = ide_dev_attrs, |
1957 | .suspend = generic_ide_suspend, | 1988 | .suspend = generic_ide_suspend, |
1958 | .resume = generic_ide_resume, | 1989 | .resume = generic_ide_resume, |