Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95612
b: refs/heads/master
c: 9cbfe20
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Bunk authored and Ingo Molnar committed Apr 30, 2008
1 parent 386bfae commit ee9a82c
Show file tree
Hide file tree
Showing 18 changed files with 954 additions and 216 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6de3d58dcfbab516dbe9aff36ea9542f40cd1bf2
refs/heads/master: 9cbfe20068878d597cfa064be9cab871875bea60
20 changes: 9 additions & 11 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,15 +1070,15 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
device_dir->owner = THIS_MODULE;

/* 'info' [R] */
entry = proc_create_data("info", S_IRUGO, device_dir,
entry = proc_create_data("info", S_IRUGO, acpi_device_dir(device),
&acpi_video_device_info_fops, acpi_driver_data(device));
if (!entry)
goto err_remove_dir;

/* 'state' [R/W] */
acpi_video_device_state_fops.write = acpi_video_device_write_state;
entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR,
device_dir,
acpi_device_dir(device),
&acpi_video_device_state_fops,
acpi_driver_data(device));
if (!entry)
Expand All @@ -1088,21 +1088,19 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
acpi_video_device_brightness_fops.write =
acpi_video_device_write_brightness;
entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR,
device_dir,
acpi_device_dir(device),
&acpi_video_device_brightness_fops,
acpi_driver_data(device));
if (!entry)
goto err_remove_state;

/* 'EDID' [R] */
entry = proc_create_data("EDID", S_IRUGO, device_dir,
entry = proc_create_data("EDID", S_IRUGO, acpi_device_dir(device),
&acpi_video_device_EDID_fops,
acpi_driver_data(device));
if (!entry)
goto err_remove_brightness;

acpi_device_dir(device) = device_dir;

return 0;

err_remove_brightness:
Expand Down Expand Up @@ -1348,21 +1346,21 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
device_dir->owner = THIS_MODULE;

/* 'info' [R] */
entry = proc_create_data("info", S_IRUGO, device_dir,
entry = proc_create_data("info", S_IRUGO, acpi_device_dir(device),
&acpi_video_bus_info_fops,
acpi_driver_data(device));
if (!entry)
goto err_remove_dir;

/* 'ROM' [R] */
entry = proc_create_data("ROM", S_IRUGO, device_dir,
entry = proc_create_data("ROM", S_IRUGO, acpi_device_dir(device),
&acpi_video_bus_ROM_fops,
acpi_driver_data(device));
if (!entry)
goto err_remove_info;

/* 'POST_info' [R] */
entry = proc_create_data("POST_info", S_IRUGO, device_dir,
entry = proc_create_data("POST_info", S_IRUGO, acpi_device_dir(device),
&acpi_video_bus_POST_info_fops,
acpi_driver_data(device));
if (!entry)
Expand All @@ -1371,7 +1369,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
/* 'POST' [R/W] */
acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR,
device_dir,
acpi_device_dir(device),
&acpi_video_bus_POST_fops,
acpi_driver_data(device));
if (!entry)
Expand All @@ -1380,7 +1378,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
/* 'DOS' [R/W] */
acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR,
device_dir,
acpi_device_dir(device),
&acpi_video_bus_DOS_fops,
acpi_driver_data(device));
if (!entry)
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ extern void sysdev_shutdown(void);
extern int sysdev_suspend(pm_message_t state);
extern int sysdev_resume(void);

static inline struct class_device *to_class_dev(struct kobject *obj)
{
return container_of(obj, struct class_device, kobj);
}

static inline
struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
{
return container_of(_attr, struct class_device_attribute, attr);
}

extern char *make_class_name(const char *name, struct kobject *kobj);

extern int devres_release_all(struct device *dev);
Expand Down
Loading

0 comments on commit ee9a82c

Please sign in to comment.