diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 2 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 16 | ||||
-rw-r--r-- | drivers/acpi/video.c | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index feab124d8e05..cbfc81579c9a 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -194,7 +194,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) | |||
194 | 194 | ||
195 | if (!device->flags.power_manageable) { | 195 | if (!device->flags.power_manageable) { |
196 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n", | 196 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n", |
197 | device->dev.kobj.name)); | 197 | kobject_name(&device->dev.kobj))); |
198 | return -ENODEV; | 198 | return -ENODEV; |
199 | } | 199 | } |
200 | /* | 200 | /* |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 64620d668742..5b4d462117cf 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -319,16 +319,18 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv) | |||
319 | return !acpi_match_device_ids(acpi_dev, acpi_drv->ids); | 319 | return !acpi_match_device_ids(acpi_dev, acpi_drv->ids); |
320 | } | 320 | } |
321 | 321 | ||
322 | static int acpi_device_uevent(struct device *dev, char **envp, int num_envp, | 322 | static int acpi_device_uevent(struct device *dev, struct kobj_uevent_env *env) |
323 | char *buffer, int buffer_size) | ||
324 | { | 323 | { |
325 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 324 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
325 | int len; | ||
326 | 326 | ||
327 | strcpy(buffer, "MODALIAS="); | 327 | if (add_uevent_var(env, "MODALIAS=")) |
328 | if (create_modalias(acpi_dev, buffer + 9, buffer_size - 9) > 0) { | 328 | return -ENOMEM; |
329 | envp[0] = buffer; | 329 | len = create_modalias(acpi_dev, &env->buf[env->buflen - 1], |
330 | envp[1] = NULL; | 330 | sizeof(env->buf) - env->buflen); |
331 | } | 331 | if (len >= (sizeof(env->buf) - env->buflen)) |
332 | return -ENOMEM; | ||
333 | env->buflen += len; | ||
332 | return 0; | 334 | return 0; |
333 | } | 335 | } |
334 | 336 | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index d05891f16282..b8a2095cb5ee 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -316,7 +316,7 @@ static int acpi_video_output_get(struct output_device *od) | |||
316 | { | 316 | { |
317 | unsigned long state; | 317 | unsigned long state; |
318 | struct acpi_video_device *vd = | 318 | struct acpi_video_device *vd = |
319 | (struct acpi_video_device *)class_get_devdata(&od->class_dev); | 319 | (struct acpi_video_device *)dev_get_drvdata(&od->dev); |
320 | acpi_video_device_get_state(vd, &state); | 320 | acpi_video_device_get_state(vd, &state); |
321 | return (int)state; | 321 | return (int)state; |
322 | } | 322 | } |
@@ -325,7 +325,7 @@ static int acpi_video_output_set(struct output_device *od) | |||
325 | { | 325 | { |
326 | unsigned long state = od->request_state; | 326 | unsigned long state = od->request_state; |
327 | struct acpi_video_device *vd= | 327 | struct acpi_video_device *vd= |
328 | (struct acpi_video_device *)class_get_devdata(&od->class_dev); | 328 | (struct acpi_video_device *)dev_get_drvdata(&od->dev); |
329 | return acpi_video_device_set_state(vd, state); | 329 | return acpi_video_device_set_state(vd, state); |
330 | } | 330 | } |
331 | 331 | ||