diff options
| -rw-r--r-- | drivers/platform/x86/dell-laptop.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 9724613c28a6..35758cbc6bc8 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
| @@ -306,7 +306,6 @@ static const struct dmi_system_id dell_quirks[] __initconst = { | |||
| 306 | }; | 306 | }; |
| 307 | 307 | ||
| 308 | static struct calling_interface_buffer *buffer; | 308 | static struct calling_interface_buffer *buffer; |
| 309 | static struct page *bufferpage; | ||
| 310 | static DEFINE_MUTEX(buffer_mutex); | 309 | static DEFINE_MUTEX(buffer_mutex); |
| 311 | 310 | ||
| 312 | static int hwswitch_state; | 311 | static int hwswitch_state; |
| @@ -2068,12 +2067,11 @@ static int __init dell_init(void) | |||
| 2068 | * Allocate buffer below 4GB for SMI data--only 32-bit physical addr | 2067 | * Allocate buffer below 4GB for SMI data--only 32-bit physical addr |
| 2069 | * is passed to SMI handler. | 2068 | * is passed to SMI handler. |
| 2070 | */ | 2069 | */ |
| 2071 | bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32); | 2070 | buffer = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32); |
| 2072 | if (!bufferpage) { | 2071 | if (!buffer) { |
| 2073 | ret = -ENOMEM; | 2072 | ret = -ENOMEM; |
| 2074 | goto fail_buffer; | 2073 | goto fail_buffer; |
| 2075 | } | 2074 | } |
| 2076 | buffer = page_address(bufferpage); | ||
| 2077 | 2075 | ||
| 2078 | ret = dell_setup_rfkill(); | 2076 | ret = dell_setup_rfkill(); |
| 2079 | 2077 | ||
| @@ -2135,7 +2133,7 @@ static int __init dell_init(void) | |||
| 2135 | fail_backlight: | 2133 | fail_backlight: |
| 2136 | dell_cleanup_rfkill(); | 2134 | dell_cleanup_rfkill(); |
| 2137 | fail_rfkill: | 2135 | fail_rfkill: |
| 2138 | free_page((unsigned long)bufferpage); | 2136 | free_page((unsigned long)buffer); |
| 2139 | fail_buffer: | 2137 | fail_buffer: |
| 2140 | platform_device_del(platform_device); | 2138 | platform_device_del(platform_device); |
| 2141 | fail_platform_device2: | 2139 | fail_platform_device2: |
