Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+39 -38
+12 -12
arch/arm/mach-omap1/lcd_dma.c
··· 37 37 * On OMAP1510, internal LCD controller will start the transfer 38 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 41 if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) 42 42 return 1; 43 43 ··· 95 95 96 96 void omap_set_lcd_dma_b1_rotation(int rotate) 97 97 { 98 - if (cpu_is_omap1510()) { 98 + if (cpu_is_omap15xx()) { 99 99 printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); 100 100 BUG(); 101 101 return; ··· 106 106 107 107 void omap_set_lcd_dma_b1_mirror(int mirror) 108 108 { 109 - if (cpu_is_omap1510()) { 109 + if (cpu_is_omap15xx()) { 110 110 printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); 111 111 BUG(); 112 112 } ··· 116 116 117 117 void omap_set_lcd_dma_b1_vxres(unsigned long vxres) 118 118 { 119 - if (cpu_is_omap1510()) { 119 + if (cpu_is_omap15xx()) { 120 120 printk(KERN_ERR "DMA virtual resulotion is not supported " 121 121 "in 1510 mode\n"); 122 122 BUG(); ··· 127 127 128 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 131 printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); 132 132 BUG(); 133 133 } ··· 177 177 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); 178 178 /* 1510 DMA requires the bottom address to be 2 more 179 179 * than the actual last memory access location. */ 180 - if (cpu_is_omap1510() && 180 + if (cpu_is_omap15xx() && 181 181 lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) 182 182 bottom += 2; 183 183 ei = PIXSTEP(0, 0, 1, 0); ··· 241 241 return; /* Suppress warning about uninitialized vars */ 242 242 } 243 243 244 - if (cpu_is_omap1510()) { 244 + if (cpu_is_omap15xx()) { 245 245 omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U); 246 246 omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L); 247 247 omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U); ··· 343 343 BUG(); 344 344 return; 345 345 } 346 - if (!cpu_is_omap1510()) 346 + if (!cpu_is_omap15xx()) 347 347 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, 348 348 OMAP1610_DMA_LCD_CCR); 349 349 lcd_dma.reserved = 0; ··· 360 360 * connected. Otherwise the OMAP internal controller will 361 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 364 return; 365 365 366 366 w = omap_readw(OMAP1610_DMA_LCD_CTRL); ··· 378 378 void omap_setup_lcd_dma(void) 379 379 { 380 380 BUG_ON(lcd_dma.active); 381 - if (!cpu_is_omap1510()) { 381 + if (!cpu_is_omap15xx()) { 382 382 /* Set some reasonable defaults */ 383 383 omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); 384 384 omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); 385 385 omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); 386 386 } 387 387 set_b1_regs(); 388 - if (!cpu_is_omap1510()) { 388 + if (!cpu_is_omap15xx()) { 389 389 u16 w; 390 390 391 391 w = omap_readw(OMAP1610_DMA_LCD_CCR); ··· 407 407 u16 w; 408 408 409 409 lcd_dma.active = 0; 410 - if (cpu_is_omap1510() || !lcd_dma.ext_ctrl) 410 + if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) 411 411 return; 412 412 413 413 w = omap_readw(OMAP1610_DMA_LCD_CCR);
-1
arch/arm/mach-omap1/time.c
··· 44 44 #include <linux/clocksource.h> 45 45 #include <linux/clockchips.h> 46 46 #include <linux/io.h> 47 - #include <linux/sched.h> 48 47 49 48 #include <asm/system.h> 50 49 #include <mach/hardware.h>
+16 -11
arch/arm/mach-omap2/board-devkit8000.c
··· 115 115 116 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 118 if (gpio_is_valid(dssdev->reset_gpio)) 122 119 gpio_set_value_cansleep(dssdev->reset_gpio, 1); 123 120 return 0; ··· 244 247 static int devkit8000_twl_gpio_setup(struct device *dev, 245 248 unsigned gpio, unsigned ngpio) 246 249 { 250 + int ret; 251 + 247 252 omap_mux_init_gpio(29, OMAP_PIN_INPUT); 248 253 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 249 254 mmc[0].gpio_cd = gpio + 0; ··· 254 255 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ 255 256 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 256 257 257 - /* gpio + 1 is "LCD_PWREN" (out, active high) */ 258 - devkit8000_lcd_device.reset_gpio = gpio + 1; 259 - gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN"); 260 - /* Disable until needed */ 261 - gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0); 258 + /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ 259 + devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0; 260 + ret = gpio_request_one(devkit8000_lcd_device.reset_gpio, 261 + GPIOF_DIR_OUT | GPIOF_INIT_LOW, "LCD_PWREN"); 262 + if (ret < 0) { 263 + devkit8000_lcd_device.reset_gpio = -EINVAL; 264 + printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n"); 265 + } 262 266 263 267 /* gpio + 7 is "DVI_PD" (out, active low) */ 264 268 devkit8000_dvi_device.reset_gpio = gpio + 7; 265 - gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown"); 266 - /* Disable until needed */ 267 - gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0); 269 + ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, 270 + GPIOF_DIR_OUT | GPIOF_INIT_LOW, "DVI PowerDown"); 271 + if (ret < 0) { 272 + devkit8000_dvi_device.reset_gpio = -EINVAL; 273 + printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); 274 + } 268 275 269 276 return 0; 270 277 }
-2
arch/arm/mach-omap2/board-omap4panda.c
··· 409 409 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); 410 410 omap_serial_init(); 411 411 omap4_twl6030_hsmmc_init(mmc); 412 - /* OMAP4 Panda uses internal transceiver so register nop transceiver */ 413 - usb_nop_xceiv_register(); 414 412 omap4_ehci_init(); 415 413 usb_musb_init(&musb_board_data); 416 414 }
-3
arch/arm/mach-omap2/board-rm680.c
··· 40 40 static struct regulator_init_data rm680_vemmc = { 41 41 .constraints = { 42 42 .name = "rm680_vemmc", 43 - .min_uV = 2900000, 44 - .max_uV = 2900000, 45 - .apply_uV = 1, 46 43 .valid_modes_mask = REGULATOR_MODE_NORMAL 47 44 | REGULATOR_MODE_STANDBY, 48 45 .valid_ops_mask = REGULATOR_CHANGE_STATUS
+1
arch/arm/mach-omap2/mux.c
··· 1000 1000 if (!partition->base) { 1001 1001 pr_err("%s: Could not ioremap mux partition at 0x%08x\n", 1002 1002 __func__, partition->phys); 1003 + kfree(partition); 1003 1004 return -ENODEV; 1004 1005 } 1005 1006
+4 -3
arch/arm/mach-omap2/pm34xx.c
··· 168 168 * once during boot sequence, but this works as we are not using secure 169 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 173 u32 ret; 174 + int mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); 174 175 175 176 if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 176 177 /* ··· 182 181 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); 183 182 ret = _omap_save_secure_sram((u32 *) 184 183 __pa(omap3_secure_ram_storage)); 185 - pwrdm_set_next_pwrst(mpu_pwrdm, target_mpu_state); 184 + pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); 186 185 /* Following is for error tracking, it should not happen */ 187 186 if (ret) { 188 187 printk(KERN_ERR "save_secure_sram() returns %08x\n", ··· 1095 1094 local_fiq_disable(); 1096 1095 1097 1096 omap_dma_global_context_save(); 1098 - omap3_save_secure_ram_context(PWRDM_POWER_ON); 1097 + omap3_save_secure_ram_context(); 1099 1098 omap_dma_global_context_restore(); 1100 1099 1101 1100 local_irq_enable();
+5 -6
arch/arm/mach-omap2/smartreflex.c
··· 780 780 struct omap_sr *sr_info = (struct omap_sr *) data; 781 781 782 782 if (!sr_info) { 783 - pr_warning("%s: omap_sr struct for sr_%s not found\n", 784 - __func__, sr_info->voltdm->name); 783 + pr_warning("%s: omap_sr struct not found\n", __func__); 785 784 return -EINVAL; 786 785 } 787 786 ··· 794 795 struct omap_sr *sr_info = (struct omap_sr *) data; 795 796 796 797 if (!sr_info) { 797 - pr_warning("%s: omap_sr struct for sr_%s not found\n", 798 - __func__, sr_info->voltdm->name); 798 + pr_warning("%s: omap_sr struct not found\n", __func__); 799 799 return -EINVAL; 800 800 } 801 801 ··· 832 834 833 835 if (!pdata) { 834 836 dev_err(&pdev->dev, "%s: platform data missing\n", __func__); 835 - return -EINVAL; 837 + ret = -EINVAL; 838 + goto err_free_devinfo; 836 839 } 837 840 838 841 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ··· 965 966 } 966 967 967 968 sr_info = _sr_lookup(pdata->voltdm); 968 - if (!sr_info) { 969 + if (IS_ERR(sr_info)) { 969 970 dev_warn(&pdev->dev, "%s: omap_sr struct not found\n", 970 971 __func__); 971 972 return -EINVAL;
+1
arch/arm/mach-omap2/voltage.c
··· 471 471 strcat(name, vdd->voltdm.name); 472 472 473 473 vdd->debug_dir = debugfs_create_dir(name, voltage_dir); 474 + kfree(name); 474 475 if (IS_ERR(vdd->debug_dir)) { 475 476 pr_warning("%s: Unable to create debugfs directory for" 476 477 " vdd_%s\n", __func__, vdd->voltdm.name);