Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits) PM: merge device power-management source files sysfs: add copyrights kobject: update the copyrights kset: add some kerneldoc to help describe what these strange things are Driver core: rename ktype_edd and ktype_efivar Driver core: rename ktype_driver Driver core: rename ktype_device Driver core: rename ktype_class driver core: remove subsystem_init() sysfs: move sysfs file poll implementation to sysfs_open_dirent sysfs: implement sysfs_open_dirent sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir sysfs: make sysfs_root a regular directory dirent sysfs: open code sysfs_attach_dentry() sysfs: make s_elem an anonymous union sysfs: make bin attr open get active reference of parent too sysfs: kill unnecessary NULL pointer check in sysfs_release() sysfs: kill unnecessary sysfs_get() in open paths sysfs: reposition sysfs_dirent->s_mode. sysfs: kill sysfs_update_file() ...
This commit is contained in:
@@ -194,7 +194,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
|
||||
|
||||
if (!device->flags.power_manageable) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n",
|
||||
device->dev.kobj.name));
|
||||
kobject_name(&device->dev.kobj)));
|
||||
return -ENODEV;
|
||||
}
|
||||
/*
|
||||
|
@@ -319,16 +319,18 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv)
|
||||
return !acpi_match_device_ids(acpi_dev, acpi_drv->ids);
|
||||
}
|
||||
|
||||
static int acpi_device_uevent(struct device *dev, char **envp, int num_envp,
|
||||
char *buffer, int buffer_size)
|
||||
static int acpi_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct acpi_device *acpi_dev = to_acpi_device(dev);
|
||||
int len;
|
||||
|
||||
strcpy(buffer, "MODALIAS=");
|
||||
if (create_modalias(acpi_dev, buffer + 9, buffer_size - 9) > 0) {
|
||||
envp[0] = buffer;
|
||||
envp[1] = NULL;
|
||||
}
|
||||
if (add_uevent_var(env, "MODALIAS="))
|
||||
return -ENOMEM;
|
||||
len = create_modalias(acpi_dev, &env->buf[env->buflen - 1],
|
||||
sizeof(env->buf) - env->buflen);
|
||||
if (len >= (sizeof(env->buf) - env->buflen))
|
||||
return -ENOMEM;
|
||||
env->buflen += len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -316,7 +316,7 @@ static int acpi_video_output_get(struct output_device *od)
|
||||
{
|
||||
unsigned long state;
|
||||
struct acpi_video_device *vd =
|
||||
(struct acpi_video_device *)class_get_devdata(&od->class_dev);
|
||||
(struct acpi_video_device *)dev_get_drvdata(&od->dev);
|
||||
acpi_video_device_get_state(vd, &state);
|
||||
return (int)state;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ static int acpi_video_output_set(struct output_device *od)
|
||||
{
|
||||
unsigned long state = od->request_state;
|
||||
struct acpi_video_device *vd=
|
||||
(struct acpi_video_device *)class_get_devdata(&od->class_dev);
|
||||
(struct acpi_video_device *)dev_get_drvdata(&od->dev);
|
||||
return acpi_video_device_set_state(vd, state);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user