diff options
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r-- | drivers/acpi/sbs.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 62bef0b3b614..8908a975e575 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -98,11 +98,11 @@ static int update_info_mode = UPDATE_INFO_MODE; | |||
98 | static int update_time = UPDATE_TIME; | 98 | static int update_time = UPDATE_TIME; |
99 | static int update_time2 = UPDATE_TIME2; | 99 | static int update_time2 = UPDATE_TIME2; |
100 | 100 | ||
101 | module_param(capacity_mode, int, CAPACITY_UNIT); | 101 | module_param(capacity_mode, int, 0); |
102 | module_param(update_mode, int, UPDATE_MODE); | 102 | module_param(update_mode, int, 0); |
103 | module_param(update_info_mode, int, UPDATE_INFO_MODE); | 103 | module_param(update_info_mode, int, 0); |
104 | module_param(update_time, int, UPDATE_TIME); | 104 | module_param(update_time, int, 0); |
105 | module_param(update_time2, int, UPDATE_TIME2); | 105 | module_param(update_time2, int, 0); |
106 | 106 | ||
107 | static int acpi_sbs_add(struct acpi_device *device); | 107 | static int acpi_sbs_add(struct acpi_device *device); |
108 | static int acpi_sbs_remove(struct acpi_device *device, int type); | 108 | static int acpi_sbs_remove(struct acpi_device *device, int type); |
@@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1685 | 1685 | ||
1686 | int acpi_sbs_remove(struct acpi_device *device, int type) | 1686 | int acpi_sbs_remove(struct acpi_device *device, int type) |
1687 | { | 1687 | { |
1688 | struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); | 1688 | struct acpi_sbs *sbs = NULL; |
1689 | int id; | 1689 | int id; |
1690 | 1690 | ||
1691 | if (!device || !sbs) { | 1691 | if (!device) { |
1692 | return -EINVAL; | ||
1693 | } | ||
1694 | |||
1695 | sbs = (struct acpi_sbs *)acpi_driver_data(device); | ||
1696 | |||
1697 | if (!sbs) { | ||
1692 | return -EINVAL; | 1698 | return -EINVAL; |
1693 | } | 1699 | } |
1694 | 1700 | ||