From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 12/36] i2c: Add a no-op i2c_register_board_info if i2c is disabled
Date: Fri, 18 Dec 2009 16:48:01 +0100 [thread overview]
Message-ID: <1261151305-18627-13-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1261151305-18627-12-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/i2c/i2c.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index 991dd5b..3e9d2b4 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -110,7 +110,15 @@ struct i2c_board_info {
#define I2C_BOARD_INFO(dev_type, dev_addr) \
.type = dev_type, .addr = (dev_addr)
+#ifdef CONFIG_I2C
extern int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n);
+#else
+static inline int i2c_register_board_info(int busnum,
+ struct i2c_board_info const *info, unsigned n)
+{
+ return 0;
+}
+#endif
extern int i2c_add_numbered_adapter(struct i2c_adapter *adapter);
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
--
1.6.5.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2009-12-18 15:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 15:47 barebox Patches Sascha Hauer
2009-12-18 15:47 ` [PATCH 01/36] i.MX25 3stack: fixup flash header to new names/layout Sascha Hauer
2009-12-18 15:47 ` [PATCH 02/36] ipe337: add missing include Sascha Hauer
2009-12-18 15:47 ` [PATCH 03/36] scb9328: setup chipselect the correct way Sascha Hauer
2009-12-18 15:47 ` [PATCH 04/36] read_key: Use ARRAY_SIZE instead of hardcoded value Sascha Hauer
2009-12-18 15:47 ` [PATCH 05/36] Remove unnecessary casts in key defines Sascha Hauer
2009-12-18 15:47 ` [PATCH 06/36] replace // style comments Sascha Hauer
2009-12-18 15:47 ` [PATCH 07/36] netx: enable second ethernet device Sascha Hauer
2009-12-18 15:47 ` [PATCH 08/36] pcm037: Add missing include Sascha Hauer
2009-12-18 15:47 ` [PATCH 09/36] imx ipu fb: Make fb_videomode const Sascha Hauer
2009-12-18 15:47 ` [PATCH 10/36] i.MX nand: mx21 has a v1 type controller Sascha Hauer
2009-12-18 15:48 ` [PATCH 11/36] vsprintf: Only define PAGE_SIZE if not already defined Sascha Hauer
2009-12-18 15:48 ` Sascha Hauer [this message]
2009-12-18 15:48 ` [PATCH 13/36] sandbox: update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 14/36] pcm030: Update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 15/36] mx21ads: update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 16/36] pcm037: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 17/36] pca100: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 18/36] mx27ads: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 19/36] ipe337: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 20/36] scb9328: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 21/36] pcm043: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 22/36] pm9263: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 23/36] netx: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 24/36] mmccpu: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 25/36] eukrea cpuimx27: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 26/36] at91sam9260ek: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 27/36] at91sam9263ek: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 28/36] Digi a9m2410: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 29/36] Digi a9m2440: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 30/36] i.MX25 3stack: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 31/36] i.MX35 " Sascha Hauer
2009-12-18 15:48 ` [PATCH 32/36] sdp3430: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 33/36] beagle board: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 34/36] omap3_evm: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 35/36] Makefile: clean barebox.ldr Sascha Hauer
2009-12-18 15:48 ` [PATCH 36/36] Fix barebox Version number Sascha Hauer
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=1261151305-18627-13-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox