diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-07 17:05:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-07 17:05:24 -0500 |
commit | b8f049ae5593255e42179baa0ce726ae7fdfb30a (patch) | |
tree | 44b188911e13f189e706aa3883d1abed96ebdc42 /arch/arm | |
parent | 06262a6b8cf7999e7c2d756dcea7aabae0ee79a9 (diff) | |
parent | ed2af92bc3adf7f5c09edef64cf4383b3d60b070 (diff) |
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
arm: omap4: panda: remove usb_nop_xceiv_register(v1)
OMAP1: Fix non-working LCD on OMAP310
OMAP3: Devkit8000: Change lcd power pin
omap1: remove duplicated #include
arm: mach-omap2: mux: free allocated memory on error exit
arm: mach-omap2: board-rm680: fix rm680_vemmc regulator constraints
OMAP: PM: SmartReflex: Fix possible null pointer read access
OMAP: PM: SmartReflex: Fix possible memory leak
arm: mach-omap2: voltage: debugfs: fix memory leak
OMAP3: PM: fix save secure RAM to restore MPU power state
OMAP: PM: SmartReflex: Add missing IS_ERR test
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap1/lcd_dma.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-omap1/time.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rm680.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltage.c | 1 |
9 files changed, 39 insertions, 38 deletions
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index c9088d85da04..453809359ba6 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -37,7 +37,7 @@ int omap_lcd_dma_running(void) | |||
37 | * On OMAP1510, internal LCD controller will start the transfer | 37 | * On OMAP1510, internal LCD controller will start the transfer |
38 | * when it gets enabled, so assume DMA running if LCD enabled. | 38 | * when it gets enabled, so assume DMA running if LCD enabled. |
39 | */ | 39 | */ |
40 | if (cpu_is_omap1510()) | 40 | if (cpu_is_omap15xx()) |
41 | if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) | 41 | if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) |
42 | return 1; | 42 | return 1; |
43 | 43 | ||
@@ -95,7 +95,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer); | |||
95 | 95 | ||
96 | void omap_set_lcd_dma_b1_rotation(int rotate) | 96 | void omap_set_lcd_dma_b1_rotation(int rotate) |
97 | { | 97 | { |
98 | if (cpu_is_omap1510()) { | 98 | if (cpu_is_omap15xx()) { |
99 | printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); | 99 | printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); |
100 | BUG(); | 100 | BUG(); |
101 | return; | 101 | return; |
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation); | |||
106 | 106 | ||
107 | void omap_set_lcd_dma_b1_mirror(int mirror) | 107 | void omap_set_lcd_dma_b1_mirror(int mirror) |
108 | { | 108 | { |
109 | if (cpu_is_omap1510()) { | 109 | if (cpu_is_omap15xx()) { |
110 | printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); | 110 | printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); |
111 | BUG(); | 111 | BUG(); |
112 | } | 112 | } |
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror); | |||
116 | 116 | ||
117 | void omap_set_lcd_dma_b1_vxres(unsigned long vxres) | 117 | void omap_set_lcd_dma_b1_vxres(unsigned long vxres) |
118 | { | 118 | { |
119 | if (cpu_is_omap1510()) { | 119 | if (cpu_is_omap15xx()) { |
120 | printk(KERN_ERR "DMA virtual resulotion is not supported " | 120 | printk(KERN_ERR "DMA virtual resulotion is not supported " |
121 | "in 1510 mode\n"); | 121 | "in 1510 mode\n"); |
122 | BUG(); | 122 | BUG(); |
@@ -127,7 +127,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres); | |||
127 | 127 | ||
128 | void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale) | 128 | void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale) |
129 | { | 129 | { |
130 | if (cpu_is_omap1510()) { | 130 | if (cpu_is_omap15xx()) { |
131 | printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); | 131 | printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); |
132 | BUG(); | 132 | BUG(); |
133 | } | 133 | } |
@@ -177,7 +177,7 @@ static void set_b1_regs(void) | |||
177 | bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); | 177 | bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); |
178 | /* 1510 DMA requires the bottom address to be 2 more | 178 | /* 1510 DMA requires the bottom address to be 2 more |
179 | * than the actual last memory access location. */ | 179 | * than the actual last memory access location. */ |
180 | if (cpu_is_omap1510() && | 180 | if (cpu_is_omap15xx() && |
181 | lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) | 181 | lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) |
182 | bottom += 2; | 182 | bottom += 2; |
183 | ei = PIXSTEP(0, 0, 1, 0); | 183 | ei = PIXSTEP(0, 0, 1, 0); |
@@ -241,7 +241,7 @@ static void set_b1_regs(void) | |||
241 | return; /* Suppress warning about uninitialized vars */ | 241 | return; /* Suppress warning about uninitialized vars */ |
242 | } | 242 | } |
243 | 243 | ||
244 | if (cpu_is_omap1510()) { | 244 | if (cpu_is_omap15xx()) { |
245 | omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U); | 245 | omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U); |
246 | omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L); | 246 | omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L); |
247 | omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U); | 247 | omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U); |
@@ -343,7 +343,7 @@ void omap_free_lcd_dma(void) | |||
343 | BUG(); | 343 | BUG(); |
344 | return; | 344 | return; |
345 | } | 345 | } |
346 | if (!cpu_is_omap1510()) | 346 | if (!cpu_is_omap15xx()) |
347 | omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, | 347 | omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, |
348 | OMAP1610_DMA_LCD_CCR); | 348 | OMAP1610_DMA_LCD_CCR); |
349 | lcd_dma.reserved = 0; | 349 | lcd_dma.reserved = 0; |
@@ -360,7 +360,7 @@ void omap_enable_lcd_dma(void) | |||
360 | * connected. Otherwise the OMAP internal controller will | 360 | * connected. Otherwise the OMAP internal controller will |
361 | * start the transfer when it gets enabled. | 361 | * start the transfer when it gets enabled. |
362 | */ | 362 | */ |
363 | if (cpu_is_omap1510() || !lcd_dma.ext_ctrl) | 363 | if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) |
364 | return; | 364 | return; |
365 | 365 | ||
366 | w = omap_readw(OMAP1610_DMA_LCD_CTRL); | 366 | w = omap_readw(OMAP1610_DMA_LCD_CTRL); |
@@ -378,14 +378,14 @@ EXPORT_SYMBOL(omap_enable_lcd_dma); | |||
378 | void omap_setup_lcd_dma(void) | 378 | void omap_setup_lcd_dma(void) |
379 | { | 379 | { |
380 | BUG_ON(lcd_dma.active); | 380 | BUG_ON(lcd_dma.active); |
381 | if (!cpu_is_omap1510()) { | 381 | if (!cpu_is_omap15xx()) { |
382 | /* Set some reasonable defaults */ | 382 | /* Set some reasonable defaults */ |
383 | omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); | 383 | omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); |
384 | omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); | 384 | omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); |
385 | omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); | 385 | omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); |
386 | } | 386 | } |
387 | set_b1_regs(); | 387 | set_b1_regs(); |
388 | if (!cpu_is_omap1510()) { | 388 | if (!cpu_is_omap15xx()) { |
389 | u16 w; | 389 | u16 w; |
390 | 390 | ||
391 | w = omap_readw(OMAP1610_DMA_LCD_CCR); | 391 | w = omap_readw(OMAP1610_DMA_LCD_CCR); |
@@ -407,7 +407,7 @@ void omap_stop_lcd_dma(void) | |||
407 | u16 w; | 407 | u16 w; |
408 | 408 | ||
409 | lcd_dma.active = 0; | 409 | lcd_dma.active = 0; |
410 | if (cpu_is_omap1510() || !lcd_dma.ext_ctrl) | 410 | if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) |
411 | return; | 411 | return; |
412 | 412 | ||
413 | w = omap_readw(OMAP1610_DMA_LCD_CCR); | 413 | w = omap_readw(OMAP1610_DMA_LCD_CCR); |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index f83fc335c613..6885d2fac183 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/clocksource.h> | 44 | #include <linux/clocksource.h> |
45 | #include <linux/clockchips.h> | 45 | #include <linux/clockchips.h> |
46 | #include <linux/io.h> | 46 | #include <linux/io.h> |
47 | #include <linux/sched.h> | ||
48 | 47 | ||
49 | #include <asm/system.h> | 48 | #include <asm/system.h> |
50 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index e906e05bb41b..9a2a31e011ce 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -115,9 +115,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
115 | 115 | ||
116 | static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev) | 116 | static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev) |
117 | { | 117 | { |
118 | twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1); | ||
119 | twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0); | ||
120 | |||
121 | if (gpio_is_valid(dssdev->reset_gpio)) | 118 | if (gpio_is_valid(dssdev->reset_gpio)) |
122 | gpio_set_value_cansleep(dssdev->reset_gpio, 1); | 119 | gpio_set_value_cansleep(dssdev->reset_gpio, 1); |
123 | return 0; | 120 | return 0; |
@@ -247,6 +244,8 @@ static struct gpio_led gpio_leds[]; | |||
247 | static int devkit8000_twl_gpio_setup(struct device *dev, | 244 | static int devkit8000_twl_gpio_setup(struct device *dev, |
248 | unsigned gpio, unsigned ngpio) | 245 | unsigned gpio, unsigned ngpio) |
249 | { | 246 | { |
247 | int ret; | ||
248 | |||
250 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); | 249 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); |
251 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 250 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
252 | mmc[0].gpio_cd = gpio + 0; | 251 | mmc[0].gpio_cd = gpio + 0; |
@@ -255,17 +254,23 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
255 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | 254 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
256 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 255 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
257 | 256 | ||
258 | /* gpio + 1 is "LCD_PWREN" (out, active high) */ | 257 | /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ |
259 | devkit8000_lcd_device.reset_gpio = gpio + 1; | 258 | devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0; |
260 | gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN"); | 259 | ret = gpio_request_one(devkit8000_lcd_device.reset_gpio, |
261 | /* Disable until needed */ | 260 | GPIOF_DIR_OUT | GPIOF_INIT_LOW, "LCD_PWREN"); |
262 | gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0); | 261 | if (ret < 0) { |
262 | devkit8000_lcd_device.reset_gpio = -EINVAL; | ||
263 | printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n"); | ||
264 | } | ||
263 | 265 | ||
264 | /* gpio + 7 is "DVI_PD" (out, active low) */ | 266 | /* gpio + 7 is "DVI_PD" (out, active low) */ |
265 | devkit8000_dvi_device.reset_gpio = gpio + 7; | 267 | devkit8000_dvi_device.reset_gpio = gpio + 7; |
266 | gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown"); | 268 | ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, |
267 | /* Disable until needed */ | 269 | GPIOF_DIR_OUT | GPIOF_INIT_LOW, "DVI PowerDown"); |
268 | gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0); | 270 | if (ret < 0) { |
271 | devkit8000_dvi_device.reset_gpio = -EINVAL; | ||
272 | printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); | ||
273 | } | ||
269 | 274 | ||
270 | return 0; | 275 | return 0; |
271 | } | 276 | } |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e001a048dc0c..e944025d5ef8 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -409,8 +409,6 @@ static void __init omap4_panda_init(void) | |||
409 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 409 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
410 | omap_serial_init(); | 410 | omap_serial_init(); |
411 | omap4_twl6030_hsmmc_init(mmc); | 411 | omap4_twl6030_hsmmc_init(mmc); |
412 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ | ||
413 | usb_nop_xceiv_register(); | ||
414 | omap4_ehci_init(); | 412 | omap4_ehci_init(); |
415 | usb_musb_init(&musb_board_data); | 413 | usb_musb_init(&musb_board_data); |
416 | } | 414 | } |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index cb77be7ac44f..39a71bb8a308 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -40,9 +40,6 @@ static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | |||
40 | static struct regulator_init_data rm680_vemmc = { | 40 | static struct regulator_init_data rm680_vemmc = { |
41 | .constraints = { | 41 | .constraints = { |
42 | .name = "rm680_vemmc", | 42 | .name = "rm680_vemmc", |
43 | .min_uV = 2900000, | ||
44 | .max_uV = 2900000, | ||
45 | .apply_uV = 1, | ||
46 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 43 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
47 | | REGULATOR_MODE_STANDBY, | 44 | | REGULATOR_MODE_STANDBY, |
48 | .valid_ops_mask = REGULATOR_CHANGE_STATUS | 45 | .valid_ops_mask = REGULATOR_CHANGE_STATUS |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index fae49d12bc76..98148b6c36e9 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -1000,6 +1000,7 @@ int __init omap_mux_init(const char *name, u32 flags, | |||
1000 | if (!partition->base) { | 1000 | if (!partition->base) { |
1001 | pr_err("%s: Could not ioremap mux partition at 0x%08x\n", | 1001 | pr_err("%s: Could not ioremap mux partition at 0x%08x\n", |
1002 | __func__, partition->phys); | 1002 | __func__, partition->phys); |
1003 | kfree(partition); | ||
1003 | return -ENODEV; | 1004 | return -ENODEV; |
1004 | } | 1005 | } |
1005 | 1006 | ||
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a4aa1920a75c..2f864e4b085d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -168,9 +168,10 @@ static void omap3_core_restore_context(void) | |||
168 | * once during boot sequence, but this works as we are not using secure | 168 | * once during boot sequence, but this works as we are not using secure |
169 | * services. | 169 | * services. |
170 | */ | 170 | */ |
171 | static void omap3_save_secure_ram_context(u32 target_mpu_state) | 171 | static void omap3_save_secure_ram_context(void) |
172 | { | 172 | { |
173 | u32 ret; | 173 | u32 ret; |
174 | int mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); | ||
174 | 175 | ||
175 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { | 176 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { |
176 | /* | 177 | /* |
@@ -181,7 +182,7 @@ static void omap3_save_secure_ram_context(u32 target_mpu_state) | |||
181 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 182 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
182 | ret = _omap_save_secure_sram((u32 *) | 183 | ret = _omap_save_secure_sram((u32 *) |
183 | __pa(omap3_secure_ram_storage)); | 184 | __pa(omap3_secure_ram_storage)); |
184 | pwrdm_set_next_pwrst(mpu_pwrdm, target_mpu_state); | 185 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); |
185 | /* Following is for error tracking, it should not happen */ | 186 | /* Following is for error tracking, it should not happen */ |
186 | if (ret) { | 187 | if (ret) { |
187 | printk(KERN_ERR "save_secure_sram() returns %08x\n", | 188 | printk(KERN_ERR "save_secure_sram() returns %08x\n", |
@@ -1094,7 +1095,7 @@ static int __init omap3_pm_init(void) | |||
1094 | local_fiq_disable(); | 1095 | local_fiq_disable(); |
1095 | 1096 | ||
1096 | omap_dma_global_context_save(); | 1097 | omap_dma_global_context_save(); |
1097 | omap3_save_secure_ram_context(PWRDM_POWER_ON); | 1098 | omap3_save_secure_ram_context(); |
1098 | omap_dma_global_context_restore(); | 1099 | omap_dma_global_context_restore(); |
1099 | 1100 | ||
1100 | local_irq_enable(); | 1101 | local_irq_enable(); |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 77ecebf3fae2..c37e823266d3 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -780,8 +780,7 @@ static int omap_sr_autocomp_show(void *data, u64 *val) | |||
780 | struct omap_sr *sr_info = (struct omap_sr *) data; | 780 | struct omap_sr *sr_info = (struct omap_sr *) data; |
781 | 781 | ||
782 | if (!sr_info) { | 782 | if (!sr_info) { |
783 | pr_warning("%s: omap_sr struct for sr_%s not found\n", | 783 | pr_warning("%s: omap_sr struct not found\n", __func__); |
784 | __func__, sr_info->voltdm->name); | ||
785 | return -EINVAL; | 784 | return -EINVAL; |
786 | } | 785 | } |
787 | 786 | ||
@@ -795,8 +794,7 @@ static int omap_sr_autocomp_store(void *data, u64 val) | |||
795 | struct omap_sr *sr_info = (struct omap_sr *) data; | 794 | struct omap_sr *sr_info = (struct omap_sr *) data; |
796 | 795 | ||
797 | if (!sr_info) { | 796 | if (!sr_info) { |
798 | pr_warning("%s: omap_sr struct for sr_%s not found\n", | 797 | pr_warning("%s: omap_sr struct not found\n", __func__); |
799 | __func__, sr_info->voltdm->name); | ||
800 | return -EINVAL; | 798 | return -EINVAL; |
801 | } | 799 | } |
802 | 800 | ||
@@ -834,7 +832,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
834 | 832 | ||
835 | if (!pdata) { | 833 | if (!pdata) { |
836 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); | 834 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); |
837 | return -EINVAL; | 835 | ret = -EINVAL; |
836 | goto err_free_devinfo; | ||
838 | } | 837 | } |
839 | 838 | ||
840 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 839 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -966,7 +965,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev) | |||
966 | } | 965 | } |
967 | 966 | ||
968 | sr_info = _sr_lookup(pdata->voltdm); | 967 | sr_info = _sr_lookup(pdata->voltdm); |
969 | if (!sr_info) { | 968 | if (IS_ERR(sr_info)) { |
970 | dev_warn(&pdev->dev, "%s: omap_sr struct not found\n", | 969 | dev_warn(&pdev->dev, "%s: omap_sr struct not found\n", |
971 | __func__); | 970 | __func__); |
972 | return -EINVAL; | 971 | return -EINVAL; |
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index ed6079c94c57..12be525b8df4 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c | |||
@@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) | |||
471 | strcat(name, vdd->voltdm.name); | 471 | strcat(name, vdd->voltdm.name); |
472 | 472 | ||
473 | vdd->debug_dir = debugfs_create_dir(name, voltage_dir); | 473 | vdd->debug_dir = debugfs_create_dir(name, voltage_dir); |
474 | kfree(name); | ||
474 | if (IS_ERR(vdd->debug_dir)) { | 475 | if (IS_ERR(vdd->debug_dir)) { |
475 | pr_warning("%s: Unable to create debugfs directory for" | 476 | pr_warning("%s: Unable to create debugfs directory for" |
476 | " vdd_%s\n", __func__, vdd->voltdm.name); | 477 | " vdd_%s\n", __func__, vdd->voltdm.name); |