diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 18:30:58 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 18:30:58 -0400 |
commit | 77501f3cb648e18733509a951ed31eddd7ef2c0b (patch) | |
tree | 82624caa354394df2422562bf6dda56a2c088704 /sound/pci/ac97/ac97_bus.c | |
parent | 422fa08e538b649a9b80258950d2f8a202f45f19 (diff) | |
parent | 59a10b172fccaea793352c00fd9065f0a5b4ef70 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'sound/pci/ac97/ac97_bus.c')
-rw-r--r-- | sound/pci/ac97/ac97_bus.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c index 227f8b9f67ce..becbc420ba41 100644 --- a/sound/pci/ac97/ac97_bus.c +++ b/sound/pci/ac97/ac97_bus.c | |||
@@ -17,25 +17,21 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Codec families have names seperated by commas, so we search for an | 20 | * Let drivers decide whether they want to support given codec from their |
21 | * individual codec name within the family string. | 21 | * probe method. Drivers have direct access to the ac97_t structure and may |
22 | * decide based on the id field amongst other things. | ||
22 | */ | 23 | */ |
23 | static int ac97_bus_match(struct device *dev, struct device_driver *drv) | 24 | static int ac97_bus_match(struct device *dev, struct device_driver *drv) |
24 | { | 25 | { |
25 | return (strstr(dev->bus_id, drv->name) != NULL); | 26 | return 1; |
26 | } | 27 | } |
27 | 28 | ||
28 | static int ac97_bus_suspend(struct device *dev, pm_message_t state) | 29 | static int ac97_bus_suspend(struct device *dev, pm_message_t state) |
29 | { | 30 | { |
30 | int ret = 0; | 31 | int ret = 0; |
31 | 32 | ||
32 | if (dev->driver && dev->driver->suspend) { | 33 | if (dev->driver && dev->driver->suspend) |
33 | ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE); | 34 | ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); |
34 | if (ret == 0) | ||
35 | ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE); | ||
36 | if (ret == 0) | ||
37 | ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); | ||
38 | } | ||
39 | return ret; | 35 | return ret; |
40 | } | 36 | } |
41 | 37 | ||
@@ -43,13 +39,8 @@ static int ac97_bus_resume(struct device *dev) | |||
43 | { | 39 | { |
44 | int ret = 0; | 40 | int ret = 0; |
45 | 41 | ||
46 | if (dev->driver && dev->driver->resume) { | 42 | if (dev->driver && dev->driver->resume) |
47 | ret = dev->driver->resume(dev, RESUME_POWER_ON); | 43 | ret = dev->driver->resume(dev, RESUME_POWER_ON); |
48 | if (ret == 0) | ||
49 | ret = dev->driver->resume(dev, RESUME_RESTORE_STATE); | ||
50 | if (ret == 0) | ||
51 | ret = dev->driver->resume(dev, RESUME_ENABLE); | ||
52 | } | ||
53 | return ret; | 44 | return ret; |
54 | } | 45 | } |
55 | 46 | ||