[PATCH] fix generic HDLC synclink mismatch build error

Paul Fulghum
2006-06-07T15:43:11Z

Fix build errors caused by generic HDLC
and synclink configuration mismatch. Generic HDLC
symbols referenced from synclink drivers do not
resolve if synclink drivers are built-in and generic
HDLC is modularized.

kbuild depends statement to demote synclink can't be
used because generic HDLC support is optional for
synclink driver

kbuild select statement to promote generic HDLC can't
be used because some kernel developers consider it
ugly and believe it should never be used
(so I surrender to the flow)

The last remaining alternative suppresses inclusion
of generic HDLC support in the synclink drivers if
the kernel configuration has synclink built-in and
generic HDLC modularized.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>

--- a/drivers/char/synclink.c 2006-06-07 10:07:13.000000000 -0500
+++ b/drivers/char/synclink.c 2006-06-07 10:06:00.000000000 -0500
@@ -103,7 +103,7 @@
#include <linux/hdlc.h>
#include <linux/dma-mapping.h>

-#ifdef CONFIG_HDLC_MODULE
+#if defined(CONFIG_HDLC_MODULE) && defined(CONFIG_SYNCLINK_MODULE)
#define CONFIG_HDLC 1
#endif

--- a/drivers/char/pcmcia/synclink_cs.c 2006-06-07 09:35:05.000000000 -0500
+++ b/drivers/char/pcmcia/synclink_cs.c 2006-06-07 10:09:49.000000000 -0500
@@ -77,7 +77,7 @@
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>

-#ifdef CONFIG_HDLC_MODULE
+#if defined(CONFIG_HDLC_MODULE) && defined(CONFIG_SYNCLINK_CS_MODULE)
#define CONFIG_HDLC 1
#endif

--- a/drivers/char/synclink_gt.c 2006-06-07 09:35:05.000000000 -0500
+++ b/drivers/char/synclink_gt.c 2006-06-07 10:09:25.000000000 -0500
@@ -84,7 +84,7 @@

#include "linux/synclink.h"

-#ifdef CONFIG_HDLC_MODULE
+#if defined(CONFIG_HDLC_MODULE) && defined(CONFIG_SYNCLINK_GT_MODULE)
#define CONFIG_HDLC 1
#endif

--- a/drivers/char/synclinkmp.c 2006-06-07 09:35:05.000000000 -0500
+++ b/drivers/char/synclinkmp.c 2006-06-07 10:08:46.000000000 -0500
@@ -68,7 +68,7 @@
#include <linux/workqueue.h>
#include <linux/hdlc.h>

-#ifdef CONFIG_HDLC_MODULE
+#if defined(CONFIG_HDLC_MODULE) && defined(CONFIG_SYNCLINKMP_MODULE)
#define CONFIG_HDLC 1
#endif