* [PATCH] [POWERPC] Fix of_i2c include for module compilation
@ 2008-05-03 12:42 Jochen Friedrich
2008-05-05 4:15 ` Paul Mackerras
0 siblings, 1 reply; 3+ messages in thread
From: Jochen Friedrich @ 2008-05-03 12:42 UTC (permalink / raw)
To: Kumar Gala
Cc: Stephen Rothwell, linuxppc-dev list, Kernel, Linux, Scott Wood,
Paul Mackerras, Jean Delvare, David Miller, Linux I2C
Now that of_i2c may be compiled as module, the header must be
exported for module compilation, as well.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
include/linux/of_i2c.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
index 2e5a967..dca6013 100644
--- a/include/linux/of_i2c.h
+++ b/include/linux/of_i2c.h
@@ -14,7 +14,7 @@
#include <linux/i2c.h>
-#ifdef CONFIG_OF_I2C
+#if defined(CONFIG_OF_I2C) || defined(CONFIG_OF_I2C_MODULE)
void of_register_i2c_devices(struct i2c_adapter *adap,
struct device_node *adap_node);
--
1.5.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] Fix of_i2c include for module compilation
2008-05-03 12:42 [PATCH] [POWERPC] Fix of_i2c include for module compilation Jochen Friedrich
@ 2008-05-05 4:15 ` Paul Mackerras
2008-05-06 18:39 ` Jochen Friedrich
0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2008-05-05 4:15 UTC (permalink / raw)
To: Jochen Friedrich
Cc: Stephen Rothwell, linuxppc-dev list, Kernel, Linux, Scott Wood,
Linux I2C, Jean Delvare, David Miller
Jochen Friedrich writes:
> -#ifdef CONFIG_OF_I2C
> +#if defined(CONFIG_OF_I2C) || defined(CONFIG_OF_I2C_MODULE)
>
> void of_register_i2c_devices(struct i2c_adapter *adap,
> struct device_node *adap_node);
Why do we have that ifdef there at all? There's only that one
external declaration within it, so the #ifdef and #endif could just be
removed. If the ifdef hadn't been there in the first place we
wouldn't have had this problem.
Paul.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] Fix of_i2c include for module compilation
2008-05-05 4:15 ` Paul Mackerras
@ 2008-05-06 18:39 ` Jochen Friedrich
0 siblings, 0 replies; 3+ messages in thread
From: Jochen Friedrich @ 2008-05-06 18:39 UTC (permalink / raw)
To: Paul Mackerras
Cc: Stephen Rothwell, linuxppc-dev list, Kernel, Linux, Scott Wood,
Linux I2C, Jean Delvare, David Miller
Hi Paul,
>> -#ifdef CONFIG_OF_I2C
>> +#if defined(CONFIG_OF_I2C) || defined(CONFIG_OF_I2C_MODULE)
>>
>> void of_register_i2c_devices(struct i2c_adapter *adap,
>> struct device_node *adap_node);
>
> Why do we have that ifdef there at all? There's only that one
> external declaration within it, so the #ifdef and #endif could just be
> removed. If the ifdef hadn't been there in the first place we
> wouldn't have had this problem.
You're right. I mainly copied from of_gpio.h without too much thinking :(.
I'll resend.
Thanks,
Jochen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-06 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03 12:42 [PATCH] [POWERPC] Fix of_i2c include for module compilation Jochen Friedrich
2008-05-05 4:15 ` Paul Mackerras
2008-05-06 18:39 ` Jochen Friedrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).