Skip to content

Commit

Permalink
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/tip/tip

Pull x86 platform changes from Ingo Molnar:
 "Small fixes and cleanups all over the map"

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/setup: Drop unneeded include <asm/dmi.h>
  x86/olpc/xo1/sci: Don't call input_free_device() after input_unregister_device()
  x86/platform/intel/mrst: Remove cast for kmalloc() return value
  x86/platform/uv: Replace kmalloc() & memset with kzalloc()
  • Loading branch information
Linus Torvalds committed Apr 30, 2013
2 parents 1e2f5b5 + 06d219d commit 74c7d2f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
#include <asm/timer.h>
#include <asm/i8259.h>
#include <asm/sections.h>
#include <asm/dmi.h>
#include <asm/io_apic.h>
#include <asm/ist.h>
#include <asm/setup_arch.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/platform/mrst/mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ static int __init sfi_parse_gpio(struct sfi_table_header *table)
num = SFI_GET_NUM_ENTRIES(sb, struct sfi_gpio_table_entry);
pentry = (struct sfi_gpio_table_entry *)sb->pentry;

gpio_table = (struct sfi_gpio_table_entry *)
kmalloc(num * sizeof(*pentry), GFP_KERNEL);
gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
if (!gpio_table)
return -1;
memcpy(gpio_table, pentry, num * sizeof(*pentry));
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/platform/olpc/olpc-xo1-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ static int setup_power_button(struct platform_device *pdev)
static void free_power_button(void)
{
input_unregister_device(power_button_idev);
input_free_device(power_button_idev);
}

static int setup_ebook_switch(struct platform_device *pdev)
Expand Down Expand Up @@ -491,7 +490,6 @@ static int setup_ebook_switch(struct platform_device *pdev)
static void free_ebook_switch(void)
{
input_unregister_device(ebook_switch_idev);
input_free_device(ebook_switch_idev);
}

static int setup_lid_switch(struct platform_device *pdev)
Expand Down Expand Up @@ -526,6 +524,7 @@ static int setup_lid_switch(struct platform_device *pdev)

err_create_attr:
input_unregister_device(lid_switch_idev);
lid_switch_idev = NULL;
err_register:
input_free_device(lid_switch_idev);
return r;
Expand All @@ -535,7 +534,6 @@ static void free_lid_switch(void)
{
device_remove_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode);
input_unregister_device(lid_switch_idev);
input_free_device(lid_switch_idev);
}

static int xo1_sci_probe(struct platform_device *pdev)
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/platform/uv/uv_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ static __init int uv_rtc_allocate_timers(void)
{
int cpu;

blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
blade_info = kzalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
if (!blade_info)
return -ENOMEM;
memset(blade_info, 0, uv_possible_blades * sizeof(void *));

for_each_present_cpu(cpu) {
int nid = cpu_to_node(cpu);
Expand Down

0 comments on commit 74c7d2f

Please sign in to comment.