From patchwork Thu Feb 9 11:18:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 140368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 532AFB6EF1 for ; Thu, 9 Feb 2012 22:26:26 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RvS75-0003ul-JR; Thu, 09 Feb 2012 11:24:31 +0000 Received: from bombadil.infradead.org ([2001:4830:2446:ff00:4687:fcff:fea6:5117]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RvS6s-0003uJ-8x; Thu, 09 Feb 2012 11:24:18 +0000 Received: from d1.icnet.pl ([212.160.220.21]) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RvS6p-0008LX-5N; Thu, 09 Feb 2012 11:24:17 +0000 Received: from 87-205-12-81.ip.netia.com.pl ([87.205.12.81] helo=localhost.localdomain) by d1.icnet.pl with asmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1RvS6B-00030r-86; Thu, 09 Feb 2012 12:23:35 +0100 From: Janusz Krzysztofik To: Tony Lindgren Subject: [PATCH] ARM: OMAP1: ams-delta: clean up init data section assignments Date: Thu, 9 Feb 2012 12:18:22 +0100 Message-Id: <1328786302-25131-1-git-send-email-jkrzyszt@tis.icnet.pl> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1328696173-17226-1-git-send-email-grinberg@compulab.co.il> References: <1328696173-17226-1-git-send-email-grinberg@compulab.co.il> X-SA-Exim-Scanned: No (on d1.icnet); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120209_062415_774573_F856BF7C X-CRM114-Status: GOOD ( 13.25 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-fbdev@vger.kernel.org, Janusz Krzysztofik , Artem Bityutskiy , Dmitry Torokhov , Tomi Valkeinen , linux-mtd@lists.infradead.org, Igor Grinberg , linux-input@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The main purpose of this patch is to fix several section mismatch warnings from the board file and a few board specific drivers, introduced mostly with recent Amstrad Delta patch series, some of them rising up only when building with CONFIG_MODULES not set. While being at it, section assignments of all init data found in the board file have been revised and hopefully optimised. Created and tested on top of current linux-omap/omap1, commit 967809bd7faf71ddc29c8081e0f21db8b201a0f4. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 35 +++++++++++++++++---------------- drivers/input/serio/ams_delta_serio.c | 2 +- drivers/mtd/nand/ams-delta.c | 2 +- drivers/video/omap/lcd_ams_delta.c | 2 +- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 87b1303..dc2455f 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -126,7 +126,7 @@ static const unsigned int ams_delta_keymap[] = { #define LATCH2_PHYS 0x08000000 #define LATCH2_VIRT 0xEC000000 -static struct map_desc ams_delta_io_desc[] __initdata = { +static struct map_desc ams_delta_io_desc[] __initconst = { /* AMS_DELTA_LATCH1 */ { .virtual = LATCH1_VIRT, @@ -150,17 +150,17 @@ static struct map_desc ams_delta_io_desc[] __initdata = { } }; -static struct omap_lcd_config ams_delta_lcd_config = { +static struct omap_lcd_config ams_delta_lcd_config __initconst = { .ctrl_name = "internal", }; -static struct omap_usb_config ams_delta_usb_config __initdata = { +static struct omap_usb_config ams_delta_usb_config __initdata_or_module = { .register_host = 1, .hmc_mode = 16, .pins[0] = 2, }; -static struct omap_board_config_kernel ams_delta_config[] __initdata = { +static struct omap_board_config_kernel ams_delta_config[] __initconst = { { OMAP_TAG_LCD, &ams_delta_lcd_config }, }; @@ -181,7 +181,7 @@ static struct bgpio_pdata latch1_pdata __initconst = { .ngpio = LATCH1_NGPIO, }; -static struct platform_device latch1_gpio_device = { +static struct platform_device latch1_gpio_device __refdata = { .name = "basic-mmio-gpio", .id = 0, .resource = latch1_resources, @@ -205,7 +205,7 @@ static struct bgpio_pdata latch2_pdata __initconst = { .ngpio = AMS_DELTA_LATCH2_NGPIO, }; -static struct platform_device latch2_gpio_device = { +static struct platform_device latch2_gpio_device __refdata = { .name = "basic-mmio-gpio", .id = 1, .resource = latch2_resources, @@ -271,7 +271,7 @@ void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value) } EXPORT_SYMBOL(ams_delta_latch_write); -static struct resource ams_delta_nand_resources[] = { +static struct resource ams_delta_nand_resources[] __initconst_or_module = { [0] = { .start = OMAP1_MPUIO_BASE, .end = OMAP1_MPUIO_BASE + @@ -280,14 +280,14 @@ static struct resource ams_delta_nand_resources[] = { }, }; -static struct platform_device ams_delta_nand_device = { +static struct platform_device ams_delta_nand_device __refdata = { .name = "ams-delta-nand", .id = -1, .num_resources = ARRAY_SIZE(ams_delta_nand_resources), .resource = ams_delta_nand_resources, }; -static struct resource ams_delta_kp_resources[] = { +static struct resource ams_delta_kp_resources[] __initconst_or_module = { [0] = { .start = INT_KEYBOARD, .end = INT_KEYBOARD, @@ -300,14 +300,14 @@ static const struct matrix_keymap_data ams_delta_keymap_data = { .keymap_size = ARRAY_SIZE(ams_delta_keymap), }; -static struct omap_kp_platform_data ams_delta_kp_data __initdata = { +static struct omap_kp_platform_data ams_delta_kp_data __initconst_or_module = { .rows = 8, .cols = 8, .keymap_data = &ams_delta_keymap_data, .delay = 9, }; -static struct platform_device ams_delta_kp_device = { +static struct platform_device ams_delta_kp_device __refdata = { .name = "omap-keypad", .id = -1, .dev = { @@ -363,7 +363,8 @@ static struct gpio_led_platform_data leds_pdata __initconst = { .num_leds = ARRAY_SIZE(gpio_leds), }; -static struct i2c_board_info ams_delta_camera_board_info[] = { +static struct i2c_board_info __initconst_or_module +ams_delta_camera_board_info[] = { { I2C_BOARD_INFO("ov6650", 0x60), }, @@ -387,7 +388,7 @@ static int ams_delta_camera_power(struct device *dev, int power) #define ams_delta_camera_power NULL #endif -static struct soc_camera_link ams_delta_iclink = { +static struct soc_camera_link ams_delta_iclink __initconst_or_module = { .bus_id = 0, /* OMAP1 SoC camera bus */ .i2c_adapter_id = 1, .board_info = &ams_delta_camera_board_info[0], @@ -395,7 +396,7 @@ static struct soc_camera_link ams_delta_iclink = { .power = ams_delta_camera_power, }; -static struct platform_device ams_delta_camera_device = { +static struct platform_device ams_delta_camera_device __refdata = { .name = "soc-camera-pdrv", .id = 0, .dev = { @@ -408,7 +409,7 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ }; -static struct platform_device *ams_delta_devices[] __initdata = { +static struct platform_device *ams_delta_devices[] __initconst = { &latch1_gpio_device, &latch2_gpio_device, &ams_delta_kp_device, @@ -459,7 +460,7 @@ static void __init ams_delta_init(void) omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1); } -static struct plat_serial8250_port ams_delta_modem_ports[] = { +static struct plat_serial8250_port ams_delta_modem_ports[] __initdata = { { .membase = IOMEM(MODEM_VIRT), .mapbase = MODEM_PHYS, @@ -473,7 +474,7 @@ static struct plat_serial8250_port ams_delta_modem_ports[] = { { }, }; -static struct platform_device ams_delta_modem_device = { +static struct platform_device ams_delta_modem_device __refdata = { .name = "serial8250", .id = PLAT8250_DEV_PLATFORM1, .dev = { diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c index 0571e2e..0830a76 100644 --- a/drivers/input/serio/ams_delta_serio.c +++ b/drivers/input/serio/ams_delta_serio.c @@ -103,7 +103,7 @@ static void ams_delta_serio_close(struct serio *serio) gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0); } -static struct gpio ams_delta_gpios[] __initconst_or_module = { +static const struct gpio ams_delta_gpios[] = { { .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATA, .flags = GPIOF_DIR_IN, diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index 85934dc..7341695 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c @@ -145,7 +145,7 @@ static int ams_delta_nand_ready(struct mtd_info *mtd) return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB); } -static struct gpio _mandatory_gpio[] __initconst_or_module = { +static const struct gpio _mandatory_gpio[] = { { .gpio = AMS_DELTA_GPIO_PIN_NAND_NCE, .flags = GPIOF_OUT_INIT_HIGH, diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c index 0e71e28..d3a3113 100644 --- a/drivers/video/omap/lcd_ams_delta.c +++ b/drivers/video/omap/lcd_ams_delta.c @@ -99,7 +99,7 @@ static struct lcd_ops ams_delta_lcd_ops = { /* omapfb panel section */ -static struct gpio _gpios[] __initconst_or_module = { +static const struct gpio _gpios[] = { { .gpio = AMS_DELTA_GPIO_PIN_LCD_VBLEN, .flags = GPIOF_OUT_INIT_LOW,