All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: fix i2c init order on ap325rxa
Date: Thu, 06 Aug 2009 14:19:18 +0000	[thread overview]
Message-ID: <20090806141918.3609.29170.sendpatchset@rx1.opensource.se> (raw)

From: Magnus Damm <damm@igel.co.jp>

Convert the AP325RXA board code to register i2c devices from
arch_initcall() instead of __initcall(). This fix unbreaks
pcf8563 RTC driver support.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 Suitable for 2.6.31-rc.

 arch/sh/boards/board-ap325rxa.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

--- 0001/arch/sh/boards/board-ap325rxa.c
+++ work/arch/sh/boards/board-ap325rxa.c	2009-08-05 18:36:47.000000000 +0900
@@ -399,6 +399,15 @@ static struct i2c_board_info __initdata 
 	},
 };
 
+static int __init ap325rxa_devices_i2c_setup(void)
+{
+	i2c_register_board_info(0, ap325rxa_i2c_devices,
+				ARRAY_SIZE(ap325rxa_i2c_devices));
+
+	return 0;
+}
+arch_initcall(ap325rxa_devices_i2c_setup);
+
 static struct i2c_board_info ap325rxa_i2c_camera[] = {
 	{
 		I2C_BOARD_INFO("ov772x", 0x21),
@@ -538,9 +547,6 @@ static int __init ap325rxa_devices_setup
 
 	platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);
 
-	i2c_register_board_info(0, ap325rxa_i2c_devices,
-				ARRAY_SIZE(ap325rxa_i2c_devices));
-
 	spi_register_board_info(ap325rxa_spi_devices,
 				ARRAY_SIZE(ap325rxa_spi_devices));
 

             reply	other threads:[~2009-08-06 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 14:19 Magnus Damm [this message]
2009-08-07  3:52 ` [PATCH] sh: fix i2c init order on ap325rxa V2 Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090806141918.3609.29170.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.