* [PATCH] mfd: mc34708: provide static inline wrapper
@ 2013-06-26 8:35 Sascha Hauer
2013-06-26 17:57 ` Alexander Shiyan
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2013-06-26 8:35 UTC (permalink / raw)
To: barebox
If the driver is disabled provide a static inline wrapper for
mc34708_get() to prevent linker errors.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/mfd/mc34708.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/mfd/mc34708.h b/include/mfd/mc34708.h
index f384c62..541c47f 100644
--- a/include/mfd/mc34708.h
+++ b/include/mfd/mc34708.h
@@ -93,7 +93,14 @@ struct mc34708 {
unsigned int revision;
};
-extern struct mc34708 *mc34708_get(void);
+#ifdef CONFIG_MFD_MC34708
+struct mc34708 *mc34708_get(void);
+#else
+static inline struct mc34708 *mc34708_get(void)
+{
+ return NULL;
+}
+#endif
extern int mc34708_reg_read(struct mc34708 *mc34708, enum mc34708_reg reg, u32 *val);
extern int mc34708_reg_write(struct mc34708 *mc34708, enum mc34708_reg reg, u32 val);
--
1.8.3.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mfd: mc34708: provide static inline wrapper
2013-06-26 8:35 [PATCH] mfd: mc34708: provide static inline wrapper Sascha Hauer
@ 2013-06-26 17:57 ` Alexander Shiyan
2013-06-27 6:37 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2013-06-26 17:57 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
> If the driver is disabled provide a static inline wrapper for
> mc34708_get() to prevent linker errors.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> include/mfd/mc34708.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/include/mfd/mc34708.h b/include/mfd/mc34708.h
> index f384c62..541c47f 100644
> --- a/include/mfd/mc34708.h
> +++ b/include/mfd/mc34708.h
> @@ -93,7 +93,14 @@ struct mc34708 {
> unsigned int revision;
> };
>
> -extern struct mc34708 *mc34708_get(void);
> +#ifdef CONFIG_MFD_MC34708
> +struct mc34708 *mc34708_get(void);
> +#else
> +static inline struct mc34708 *mc34708_get(void)
> +{
> + return NULL;
> +}
> +#endif
>
> extern int mc34708_reg_read(struct mc34708 *mc34708, enum mc34708_reg reg, u32 *val);
> extern int mc34708_reg_write(struct mc34708 *mc34708, enum mc34708_reg reg, u32 val);
> --
Please apply this to master.
I want to merge all m13xxx same as in kernel.
If I get time, of course. :)
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mfd: mc34708: provide static inline wrapper
2013-06-26 17:57 ` Alexander Shiyan
@ 2013-06-27 6:37 ` Sascha Hauer
2013-06-27 6:51 ` Re[2]: " Alexander Shiyan
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2013-06-27 6:37 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Wed, Jun 26, 2013 at 09:57:06PM +0400, Alexander Shiyan wrote:
> > If the driver is disabled provide a static inline wrapper for
> > mc34708_get() to prevent linker errors.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > include/mfd/mc34708.h | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/mfd/mc34708.h b/include/mfd/mc34708.h
> > index f384c62..541c47f 100644
> > --- a/include/mfd/mc34708.h
> > +++ b/include/mfd/mc34708.h
> > @@ -93,7 +93,14 @@ struct mc34708 {
> > unsigned int revision;
> > };
> >
> > -extern struct mc34708 *mc34708_get(void);
> > +#ifdef CONFIG_MFD_MC34708
> > +struct mc34708 *mc34708_get(void);
> > +#else
> > +static inline struct mc34708 *mc34708_get(void)
> > +{
> > + return NULL;
> > +}
> > +#endif
> >
> > extern int mc34708_reg_read(struct mc34708 *mc34708, enum mc34708_reg reg, u32 *val);
> > extern int mc34708_reg_write(struct mc34708 *mc34708, enum mc34708_reg reg, u32 val);
> > --
>
> Please apply this to master.
> I want to merge all m13xxx same as in kernel.
> If I get time, of course. :)
That's nicem but why should I apply it to master now? It will be there
anyway in a week.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re[2]: [PATCH] mfd: mc34708: provide static inline wrapper
2013-06-27 6:37 ` Sascha Hauer
@ 2013-06-27 6:51 ` Alexander Shiyan
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Shiyan @ 2013-06-27 6:51 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
> On Wed, Jun 26, 2013 at 09:57:06PM +0400, Alexander Shiyan wrote:
> > > If the driver is disabled provide a static inline wrapper for
> > > mc34708_get() to prevent linker errors.
> > >
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
...
> > Please apply this to master.
> > I want to merge all m13xxx same as in kernel.
> > If I get time, of course. :)
>
> That's nicem but why should I apply it to master now? It will be there
> anyway in a week.
Well, let it be so, since we have as a lot of other changes.
Thanks.
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-27 6:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 8:35 [PATCH] mfd: mc34708: provide static inline wrapper Sascha Hauer
2013-06-26 17:57 ` Alexander Shiyan
2013-06-27 6:37 ` Sascha Hauer
2013-06-27 6:51 ` Re[2]: " Alexander Shiyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox