git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
acpi
/
fan.c
diff --git
a/drivers/acpi/fan.c
b/drivers/acpi/fan.c
index
045c894
..
f305a82
100644
(file)
--- a/
drivers/acpi/fan.c
+++ b/
drivers/acpi/fan.c
@@
-99,8
+99,8
@@
acpi_fan_write_state(struct file *file, const char __user * buffer,
size_t count, loff_t * ppos)
{
int result = 0;
size_t count, loff_t * ppos)
{
int result = 0;
- struct seq_file *m =
(struct seq_file *)
file->private_data;
- struct acpi_fan *fan =
(struct acpi_fan *)
m->private;
+ struct seq_file *m = file->private_data;
+ struct acpi_fan *fan = m->private;
char state_string[12] = { '\0' };
char state_string[12] = { '\0' };
@@
-186,10
+186,9
@@
static int acpi_fan_add(struct acpi_device *device)
if (!device)
return -EINVAL;
if (!device)
return -EINVAL;
- fan = k
m
alloc(sizeof(struct acpi_fan), GFP_KERNEL);
+ fan = k
z
alloc(sizeof(struct acpi_fan), GFP_KERNEL);
if (!fan)
return -ENOMEM;
if (!fan)
return -ENOMEM;
- memset(fan, 0, sizeof(struct acpi_fan));
fan->device = device;
strcpy(acpi_device_name(device), "Fan");
fan->device = device;
strcpy(acpi_device_name(device), "Fan");
@@
-229,7
+228,7
@@
static int acpi_fan_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
if (!device || !acpi_driver_data(device))
return -EINVAL;
- fan =
(struct acpi_fan *)
acpi_driver_data(device);
+ fan = acpi_driver_data(device);
acpi_fan_remove_fs(device);
acpi_fan_remove_fs(device);