Skip to contentSkip to conversation

s3c24xx/h1940 fixes

PATCH New Arnaud Patard 1 participant 4 messages Apr 22, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover s3c24xx/h1940 fixes

Hi,

This patch series is fixing some small bugs I found while testing current -rc kernels on my h1940. While seeing them merged in current -rc kernels woud be nice, I think it's not a must have because nobody seems to have noticed them :(

Arnaud

#1 lore raw

PATCH 1/3 h1940: fix touchscreen support

Hi,
Content-Disposition: inline; filename=adc.patch

The touchscreen is using the adc device so it needs to be in the device list

---
arch/arm/mach-s3c2410/mach-h1940.c | 3 2 + 1 - 0 !

 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-s3c2410/mach-h1940.c +2 -1
Index: linux-2.6/arch/arm/mach-s3c2410/mach-h1940.c
===================================================================
@@ -271,7 +271,6 @@ static struct platform_device h1940_lcd_
 };
 
 static struct platform_device *h1940_devices[] __initdata = {
-	&s3c_device_ts,
 	&s3c_device_ohci,
 	&s3c_device_lcd,
 	&s3c_device_wdt,
@@ -285,6 +284,8 @@ static struct platform_device *h1940_dev
 	&s3c_device_timer[0],
 	&h1940_backlight,
 	&h1940_lcd_powerdev,
+	&s3c_device_adc,
+	&s3c_device_ts,
 };
 
 static void __init h1940_map_io(void)
#2 lore raw

PATCH 2/3 s3c2410fb: fix platdata passing

In reply to Arnaud Patard

Hi,
Content-Disposition: inline; filename=fb_ioctl_screeninfo.patch

Setting s3c2410fb_mach_info displays field with a struct marked as __initdata means it won't be available later for ioctls like FBIOPUT_VSCREENINFO and they will fail. Copying in s3c24xx_fb_set_platdata() is fixing this issue.

---
arch/arm/plat-s3c24xx/devs.c | 9 7 + 2 - 0 !

 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/plat-s3c24xx/devs.c +7 -2
Index: linux-2.6/arch/arm/plat-s3c24xx/devs.c
===================================================================
@@ -21,6 +21,7 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -149,10 +150,14 @@ void __init s3c24xx_fb_set_platdata(stru
 {
 	struct s3c2410fb_mach_info *npd;
 
-	npd = kmalloc(sizeof(*npd), GFP_KERNEL);
+	npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL);
 	if (npd) {
-		memcpy(npd, pd, sizeof(*npd));
 		s3c_device_lcd.dev.platform_data = npd;
+		npd->displays = kmemdup(pd->displays,
+			sizeof(struct s3c2410fb_display) * npd->num_displays,
+			GFP_KERNEL);
+		if (!npd->displays)
+			printk(KERN_ERR "no memory for LCD display data\n");
 	} else {
 		printk(KERN_ERR "no memory for LCD platform data\n");
 	}
#3 lore raw

PATCH 3/3 s3c24xx_mci_set_platdata should be marked __init

In reply to Arnaud Patard

Hi,
Content-Disposition: inline; filename=mci_platdata.patch

---
arch/arm/plat-s3c24xx/devs.c | 2 1 + 1 - 0 !

 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-s3c24xx/devs.c +1 -1
Index: linux-2.6/arch/arm/plat-s3c24xx/devs.c
===================================================================
@@ -371,7 +371,7 @@ struct platform_device s3c_device_sdi = 
 
 EXPORT_SYMBOL(s3c_device_sdi);
 
-void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
+void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
 {
 	struct s3c24xx_mci_pdata *npd;