From 0c37dd7c41b7391698bbe354b81fe9909c281984 Mon Sep 17 00:00:00 2001 From: Henrik Kretzschmar Date: Fri, 20 Aug 2010 19:13:24 +0200 Subject: fbdev/m68k: Fix section mismatches in q40fb.c This patch moves the q40_fix and q40_var structures from .init.data to .devinit.data. This is where now the probe function resides, which only uses them. Signed-off-by: Henrik Kretzschmar Signed-off-by: Geert Uytterhoeven --- drivers/video/q40fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index fc32c323a381..f5a39f5aa900 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -28,7 +28,7 @@ #define Q40_PHYS_SCREEN_ADDR 0xFE800000 -static struct fb_fix_screeninfo q40fb_fix __initdata = { +static struct fb_fix_screeninfo q40fb_fix __devinitdata = { .id = "Q40", .smem_len = 1024*1024, .type = FB_TYPE_PACKED_PIXELS, @@ -37,7 +37,7 @@ static struct fb_fix_screeninfo q40fb_fix __initdata = { .accel = FB_ACCEL_NONE, }; -static struct fb_var_screeninfo q40fb_var __initdata = { +static struct fb_var_screeninfo q40fb_var __devinitdata = { .xres = 1024, .yres = 512, .xres_virtual = 1024, -- cgit v1.2.3 From 10b68799b32d60ff578742d0deebc98afff30dba Mon Sep 17 00:00:00 2001 From: Vasiliy Kulikov Date: Sun, 19 Sep 2010 16:55:21 +0400 Subject: zorro: Fix device_register() error handling If device_register() fails then call put_device(). See comment to device_register. Signed-off-by: Vasiliy Kulikov Signed-off-by: Geert Uytterhoeven --- drivers/zorro/zorro.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 6455f3a244c5..e0c2807b0970 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -142,6 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) error = device_register(&bus->dev); if (error) { pr_err("Zorro: Error registering zorro_bus\n"); + put_device(&bus->dev); kfree(bus); return error; } @@ -175,6 +176,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) if (error) { dev_err(&bus->dev, "Error registering device %s\n", z->name); + put_device(&z->dev); continue; } error = zorro_create_sysfs_dev_files(z); -- cgit v1.2.3 From 8ce71db25edccde4d8e3e39bffb4178bf1018ef1 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 6 Sep 2010 16:36:47 +0200 Subject: fbdev: atafb - Remove undead ifdef ATAFB_FALCON The ATAFB_FALCON ifdef isn't necessary at this point, because it is checked in an outer ifdef level already and has no effect here. Signed-off-by: Christian Dietrich Acked-by: Krzysztof Helt Signed-off-by: Geert Uytterhoeven --- drivers/video/atafb.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index f3aada20fa02..5b2b5ef4edba 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -1718,11 +1718,9 @@ static int falcon_setcolreg(unsigned int regno, unsigned int red, (((red & 0xe000) >> 13) | ((red & 0x1000) >> 12) << 8) | (((green & 0xe000) >> 13) | ((green & 0x1000) >> 12) << 4) | ((blue & 0xe000) >> 13) | ((blue & 0x1000) >> 12); -#ifdef ATAFB_FALCON ((u32 *)info->pseudo_palette)[regno] = ((red & 0xf800) | ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11)); -#endif } return 0; } -- cgit v1.2.3