summaryrefslogtreecommitdiff
path: root/hw/xfree86/i2c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
commit49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch)
treeeebaec908150abfc0159d9ee941404918f553113 /hw/xfree86/i2c
parent0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (diff)
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
Diffstat (limited to 'hw/xfree86/i2c')
-rw-r--r--hw/xfree86/i2c/bt829.c22
-rw-r--r--hw/xfree86/i2c/bt829.h24
-rw-r--r--hw/xfree86/i2c/fi1236.c12
-rw-r--r--hw/xfree86/i2c/fi1236.h12
-rw-r--r--hw/xfree86/i2c/msp3430.c10
-rw-r--r--hw/xfree86/i2c/msp3430.h10
-rw-r--r--hw/xfree86/i2c/tda8425.c8
-rw-r--r--hw/xfree86/i2c/tda8425.h8
-rw-r--r--hw/xfree86/i2c/tda9850.c12
-rw-r--r--hw/xfree86/i2c/tda9850.h12
-rw-r--r--hw/xfree86/i2c/tda9885.c10
-rw-r--r--hw/xfree86/i2c/tda9885.h10
-rw-r--r--hw/xfree86/i2c/uda1380.c16
-rw-r--r--hw/xfree86/i2c/uda1380.h16
-rw-r--r--hw/xfree86/i2c/xf86i2c.c38
-rw-r--r--hw/xfree86/i2c/xf86i2c.h38
16 files changed, 129 insertions, 129 deletions
diff --git a/hw/xfree86/i2c/bt829.c b/hw/xfree86/i2c/bt829.c
index 5b705874a..3963ecf47 100644
--- a/hw/xfree86/i2c/bt829.c
+++ b/hw/xfree86/i2c/bt829.c
@@ -456,7 +456,7 @@ static void write_all(BT829Ptr bt)
/*
* Public functions
*/
-_X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr)
+BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr)
{
BT829Ptr bt;
I2CByte a;
@@ -542,7 +542,7 @@ _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr)
return bt;
}
-_X_EXPORT int bt829_ATIInit(BT829Ptr bt)
+int bt829_ATIInit(BT829Ptr bt)
{
bt->code = 1;
bt->len = 0;
@@ -555,7 +555,7 @@ _X_EXPORT int bt829_ATIInit(BT829Ptr bt)
return 0;
}
-_X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format)
+int bt829_SetFormat(BT829Ptr bt, CARD8 format)
{
if ((format < 1) || (format > 7)) return -1;
if ((BTVERSION <= BT819) &&
@@ -571,7 +571,7 @@ _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format)
return 0;
}
-_X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux)
+int bt829_SetMux(BT829Ptr bt, CARD8 mux)
{
if ((mux < 1) || (mux > 3)) return -1;
if (mux == bt->mux) return 0;
@@ -583,7 +583,7 @@ _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux)
return 0;
}
-_X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness)
+void bt829_SetBrightness(BT829Ptr bt, int brightness)
{
brightness = LIMIT(brightness,-1000,999); /* ensure -128 <= brightness <= 127 below */
brightness = (128*brightness)/1000;
@@ -593,7 +593,7 @@ _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness)
btwrite_bright(bt);
}
-_X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast)
+void bt829_SetContrast(BT829Ptr bt, int contrast)
{
contrast = LIMIT(contrast,-1000,1000);
contrast = (216*(contrast+1000))/1000;
@@ -604,7 +604,7 @@ _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast)
btwrite_contrast_lo(bt);
}
-_X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation)
+void bt829_SetSaturation(BT829Ptr bt, int saturation)
{
CARD16 sat_u, sat_v;
@@ -620,7 +620,7 @@ _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation)
btwrite_sat_v_lo(bt);
}
-_X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue)
+void bt829_SetTint(BT829Ptr bt, int hue)
{
hue = LIMIT(hue,-1000,999); /* ensure -128 <= hue <= 127 below */
hue = (128*hue)/1000;
@@ -630,7 +630,7 @@ _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue)
btwrite_hue(bt);
}
-_X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height)
+int bt829_SetCaptSize(BT829Ptr bt, int width, int height)
{
if ((width > bt->htotal - 2 * HCROP) ||
(16 * width < bt->htotal - 32 * HCROP)) return -1;
@@ -656,7 +656,7 @@ int bt829_SetCC(BT829Ptr bt) /* FIXME: should take ccmode as a parameter */
return 0;
}
-_X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en)
+void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en)
{
out_en = (out_en != 0);
if (out_en == bt->out_en) return;
@@ -665,7 +665,7 @@ _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en)
btwrite_vpole(bt);
}
-_X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io)
+void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io)
{
if (p_io == bt->p_io) return;
bt->p_io = p_io;
diff --git a/hw/xfree86/i2c/bt829.h b/hw/xfree86/i2c/bt829.h
index 17e6bc7bd..06e488f04 100644
--- a/hw/xfree86/i2c/bt829.h
+++ b/hw/xfree86/i2c/bt829.h
@@ -37,14 +37,14 @@ typedef struct {
} BT829Rec, *BT829Ptr;
#define xf86_bt829_Detect bt829_Detect
-extern BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
/* ATI card specific initialization */
#define BT829_ATI_ADDR_1 0x8A
#define BT829_ATI_ADDR_2 0x88
#define xf86_bt829_ATIInit bt829_ATIInit
-extern int bt829_ATIInit(BT829Ptr bt);
+extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt);
#define BT829_NTSC 1 /* NTSC-M */
#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
@@ -55,33 +55,33 @@ extern int bt829_ATIInit(BT829Ptr bt);
#define BT829_PAL_N_COMB 7 /* PAL-N combination */
#define xf86_bt829_SetFormat bt829_SetFormat
-extern int bt829_SetFormat(BT829Ptr bt, CARD8 format);
+extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format);
#define BT829_MUX2 1 /* ATI -> composite video */
#define BT829_MUX0 2 /* ATI -> tv tuner */
#define BT829_MUX1 3 /* ATI -> s-video */
#define xf86_bt829_SetMux bt829_SetMux
-extern int bt829_SetMux(BT829Ptr bt, CARD8 mux);
+extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux);
#define xf86_bt829_SetCaptSize bt829_SetCaptSize
-extern int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
+extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
#define xf86_bt829_SetBrightness bt829_SetBrightness
-extern void bt829_SetBrightness(BT829Ptr bt, int brightness);
+extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness);
#define xf86_bt829_SetContrast bt829_SetContrast
-extern void bt829_SetContrast(BT829Ptr bt, int contrast);
+extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast);
#define xf86_bt829_SetSaturation bt829_SetSaturation
-extern void bt829_SetSaturation(BT829Ptr bt, int saturation);
+extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation);
#define xf86_bt829_SetTint bt829_SetTint
-extern void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
+extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
-extern void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */
+extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */
#define xf86_bt829_SetP_IO bt829_SetP_IO
-extern void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
+extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
-int bt829_SetCC(BT829Ptr bt);
+extern _X_EXPORT int bt829_SetCC(BT829Ptr bt);
#define BT829SymbolsList \
"bt829_Detect", \
diff --git a/hw/xfree86/i2c/fi1236.c b/hw/xfree86/i2c/fi1236.c
index 950bb5b25..110563ed9 100644
--- a/hw/xfree86/i2c/fi1236.c
+++ b/hw/xfree86/i2c/fi1236.c
@@ -41,7 +41,7 @@ const FI1236_parameters tuner_parms[NUM_TUNERS] =
};
-_X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr)
+FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr)
{
FI1236Ptr f;
I2CByte a;
@@ -394,7 +394,7 @@ return TUNER_OFF;
}
/* this function is for external use only */
-_X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f)
+int TUNER_get_afc_hint(FI1236Ptr f)
{
if(f->afc_timer_installed)return TUNER_STILL_TUNING;
return f->last_afc_hint;
@@ -465,7 +465,7 @@ for(i=0;i<3;i++){
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "MT2032: failed to set frequency\n");
}
-_X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type)
+void FI1236_set_tuner_type(FI1236Ptr f, int type)
{
f->type=type;
if(type>=NUM_TUNERS)type = NUM_TUNERS-1;
@@ -532,7 +532,7 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency)
I2C_WriteRead(&(f->d), (I2CByte *)&(f->tuner_data), 4, NULL, 0);
}
-_X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency)
+void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency)
{
if(frequency < f->parm.min_freq) frequency = f->parm.min_freq;
if(frequency > f->parm.max_freq) frequency = f->parm.max_freq;
@@ -558,7 +558,7 @@ _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency)
}
-_X_EXPORT int FI1236_AFC(FI1236Ptr f)
+int FI1236_AFC(FI1236Ptr f)
{
#if 0
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "AFC: f=%p f->count=%d f->original_frequency=%d f->afc_delta=%d\n", f, f->afc_count, f->original_frequency, f->afc_delta);
@@ -601,7 +601,7 @@ _X_EXPORT int FI1236_AFC(FI1236Ptr f)
return 0; /* done */
}
-_X_EXPORT void fi1236_dump_status(FI1236Ptr f)
+void fi1236_dump_status(FI1236Ptr f)
{
if(f->type==TUNER_TYPE_MT2032){
MT2032_dump_status(f);
diff --git a/hw/xfree86/i2c/fi1236.h b/hw/xfree86/i2c/fi1236.h
index 9c56e5ae2..8dd7e4fdb 100644
--- a/hw/xfree86/i2c/fi1236.h
+++ b/hw/xfree86/i2c/fi1236.h
@@ -95,17 +95,17 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency);
"TUNER_set_frequency"
#define xf86_Detect_FI1236 Detect_FI1236
-extern FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type
-extern void FI1236_set_tuner_type(FI1236Ptr f, int type);
+extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type);
#define xf86_TUNER_set_frequency TUNER_set_frequency
-extern void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
+extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
#define xf86_FI1236_AFC FI1236_AFC
-extern int FI1236_AFC(FI1236Ptr f);
+extern _X_EXPORT int FI1236_AFC(FI1236Ptr f);
#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint
-extern int TUNER_get_afc_hint(FI1236Ptr f);
+extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f);
#define xf86_fi1236_dump_status fi1236_dump_status
-extern void fi1236_dump_status(FI1236Ptr f);
+extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f);
#endif
diff --git a/hw/xfree86/i2c/msp3430.c b/hw/xfree86/i2c/msp3430.c
index 0116db339..4bd3a7187 100644
--- a/hw/xfree86/i2c/msp3430.c
+++ b/hw/xfree86/i2c/msp3430.c
@@ -106,7 +106,7 @@ xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "MSP34xx: control=0x%02x%02x\n",
#endif
/* wrapper */
-_X_EXPORT void InitMSP3430(MSP3430Ptr m)
+void InitMSP3430(MSP3430Ptr m)
{
#if __MSPDEBUG__ > 1
xf86DrvMsg(m->d.pI2CBus->scrnIndex,X_INFO,"InitMSP3430(m->connector=%d, m->standard=%d, m->chip_family=%d)\n",
@@ -129,7 +129,7 @@ _X_EXPORT void InitMSP3430(MSP3430Ptr m)
| common functions for all MSP34xx chips
|----------------------------------------------------------------*/
-_X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr)
+MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr)
{
MSP3430Ptr m;
I2CByte a;
@@ -249,7 +249,7 @@ _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr)
return m;
}
-_X_EXPORT void ResetMSP3430(MSP3430Ptr m)
+void ResetMSP3430(MSP3430Ptr m)
{
/* Reset the MSP3430 */
SetMSP3430Control(m, 0x00, 0x80, 0x00);
@@ -262,7 +262,7 @@ _X_EXPORT void ResetMSP3430(MSP3430Ptr m)
m->volume=0;
}
-_X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value)
+void MSP3430SetVolume (MSP3430Ptr m, CARD8 value)
{
CARD8 result;
#if 0
@@ -287,7 +287,7 @@ _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value)
}
-_X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode)
+void MSP3430SetSAP (MSP3430Ptr m, int mode)
{
xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "Put actual code to change SAP here\n");
diff --git a/hw/xfree86/i2c/msp3430.h b/hw/xfree86/i2c/msp3430.h
index 500023b75..8423d1411 100644
--- a/hw/xfree86/i2c/msp3430.h
+++ b/hw/xfree86/i2c/msp3430.h
@@ -93,15 +93,15 @@ typedef struct {
/*----------------------------------------------------------*/
#define xf86_InitMSP3430 InitMSP3430
-extern void InitMSP3430(MSP3430Ptr m);
+extern _X_EXPORT void InitMSP3430(MSP3430Ptr m);
#define xf86_DetectMSP3430 DetectMSP3430
-extern MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_ResetMSP3430 ResetMSP3430
-extern void ResetMSP3430(MSP3430Ptr m);
+extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m);
#define xf86_MSP3430SetVolume MSP3430SetVolume
-extern void MSP3430SetVolume (MSP3430Ptr m, CARD8 value);
+extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value);
#define xf86_MSP3430SetSAP MSP3430SetSAP
-extern void MSP3430SetSAP (MSP3430Ptr m, int mode);
+extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode);
#define MSP3430SymbolsList \
"InitMSP3430", \
diff --git a/hw/xfree86/i2c/tda8425.c b/hw/xfree86/i2c/tda8425.c
index 6ca10e373..7631a0863 100644
--- a/hw/xfree86/i2c/tda8425.c
+++ b/hw/xfree86/i2c/tda8425.c
@@ -13,7 +13,7 @@
I2C_WriteRead(&(t->d), data, 2, NULL, 0); \
}
-_X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr, Bool force)
+TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr, Bool force)
{
TDA8425Ptr t;
@@ -44,7 +44,7 @@ _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr, Bool force)
return t;
}
-_X_EXPORT Bool tda8425_init(TDA8425Ptr t)
+Bool tda8425_init(TDA8425Ptr t)
{
t->stereo = 3; /* 3 = Spacial 2 = Linear 1 = Pseudo 0 = Forced mono */
t->v_left = 0xFF; /* FF - C0 */
@@ -59,7 +59,7 @@ _X_EXPORT Bool tda8425_init(TDA8425Ptr t)
return TRUE;
}
-_X_EXPORT void tda8425_setaudio(TDA8425Ptr t)
+void tda8425_setaudio(TDA8425Ptr t)
{
I2CByte data[2];
@@ -71,7 +71,7 @@ _X_EXPORT void tda8425_setaudio(TDA8425Ptr t)
t->mux);
}
-_X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute)
+void tda8425_mute(TDA8425Ptr t, Bool mute)
{
t->mute = mute;
tda8425_setaudio(t);
diff --git a/hw/xfree86/i2c/tda8425.h b/hw/xfree86/i2c/tda8425.h
index 636327cc6..9c33e7f60 100644
--- a/hw/xfree86/i2c/tda8425.h
+++ b/hw/xfree86/i2c/tda8425.h
@@ -24,13 +24,13 @@ typedef struct {
way to autodetect it so we have to _know_ it is there anyway */
#define xf86_Detect_tda8425 Detect_tda8425
-extern TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force);
+extern _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force);
#define xf86_tda8425_init tda8425_init
-extern Bool tda8425_init(TDA8425Ptr t);
+extern _X_EXPORT Bool tda8425_init(TDA8425Ptr t);
#define xf86_tda8425_setaudio tda8425_setaudio
-extern void tda8425_setaudio(TDA8425Ptr t);
+extern _X_EXPORT void tda8425_setaudio(TDA8425Ptr t);
#define xf86_tda8425_mute tda8425_mute
-extern void tda8425_mute(TDA8425Ptr t, Bool mute);
+extern _X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute);
#define TDA8425SymbolsList \
"Detect_tda8425", \
diff --git a/hw/xfree86/i2c/tda9850.c b/hw/xfree86/i2c/tda9850.c
index 7566012d7..5b0c581ed 100644
--- a/hw/xfree86/i2c/tda9850.c
+++ b/hw/xfree86/i2c/tda9850.c
@@ -13,7 +13,7 @@
I2C_WriteRead(&(t->d), data, 2, NULL, 0); \
}
-_X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr)
+TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr)
{
TDA9850Ptr t;
I2CByte a;
@@ -53,7 +53,7 @@ _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr)
return t;
}
-_X_EXPORT Bool tda9850_init(TDA9850Ptr t)
+Bool tda9850_init(TDA9850Ptr t)
{
t->stereo = 1;
t->sap = 0;
@@ -63,7 +63,7 @@ _X_EXPORT Bool tda9850_init(TDA9850Ptr t)
return TRUE;
}
-_X_EXPORT void tda9850_setaudio(TDA9850Ptr t)
+void tda9850_setaudio(TDA9850Ptr t)
{
CARD8 data[2];
@@ -83,7 +83,7 @@ if(t->mux==2)
TDA9850(0x06,(t->stereo<<6)|(t->sap<<7)|(t->mute?0x8:0)|(t->sap_mute?0x10:0x0));
}
-_X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute)
+void tda9850_mute(TDA9850Ptr t, Bool mute)
{
CARD8 data[2];
@@ -93,7 +93,7 @@ t->mute = mute;
TDA9850(0x06,(t->stereo<<6)|(t->sap<<7)|(t->mute?0x8:0x0)|(t->sap_mute?0x10:0x0));
}
-_X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute)
+void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute)
{
CARD8 data[2];
@@ -103,7 +103,7 @@ t->sap_mute = sap_mute;
TDA9850(0x06,(t->stereo<<6)|(t->sap<<7)|(t->mute?0x8:0x0)|(t->sap_mute?0x10:0x0));
}
-_X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t)
+CARD16 tda9850_getstatus(TDA9850Ptr t)
{
CARD16 status;
diff --git a/hw/xfree86/i2c/tda9850.h b/hw/xfree86/i2c/tda9850.h
index b78719aa4..d81679510 100644
--- a/hw/xfree86/i2c/tda9850.h
+++ b/hw/xfree86/i2c/tda9850.h
@@ -16,17 +16,17 @@ typedef struct {
#define TDA9850_ADDR_1 0xB4
#define xf86_Detect_tda9850 Detect_tda9850
-extern TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_tda9850_init tda9850_init
-extern Bool tda9850_init(TDA9850Ptr t);
+extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t);
#define xf86_tda9850_setaudio tda9850_setaudio
-extern void tda9850_setaudio(TDA9850Ptr t);
+extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t);
#define xf86_tda9850_mute tda9850_mute
-extern void tda9850_mute(TDA9850Ptr t, Bool mute);
+extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute);
#define xf86_tda9850_sap_mute tda9850_sap_mute
-extern void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute);
+extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute);
#define xf86_tda9850_getstatus tda9850_getstatus
-extern CARD16 tda9850_getstatus(TDA9850Ptr t);
+extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t);
#define TDA9850SymbolsList \
"Detect_tda9850", \
diff --git a/hw/xfree86/i2c/tda9885.c b/hw/xfree86/i2c/tda9885.c
index ad5aad1ec..4147dfdd7 100644
--- a/hw/xfree86/i2c/tda9885.c
+++ b/hw/xfree86/i2c/tda9885.c
@@ -8,7 +8,7 @@
#include "i2c_def.h"
-_X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr)
+TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr)
{
TDA9885Ptr t;
I2CByte a;
@@ -51,13 +51,13 @@ _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr)
return t;
}
-_X_EXPORT Bool tda9885_init(TDA9885Ptr t)
+Bool tda9885_init(TDA9885Ptr t)
{
t->forced_mute_audio=1;
return TRUE;
}
-_X_EXPORT void tda9885_getstatus(TDA9885Ptr t)
+void tda9885_getstatus(TDA9885Ptr t)
{
CARD8 value;
@@ -69,7 +69,7 @@ t->vif_level=(value >>6) & 1;
t->afc_win=(value >> 7)&1;
}
-_X_EXPORT void tda9885_setparameters(TDA9885Ptr t)
+void tda9885_setparameters(TDA9885Ptr t)
{
CARD8 data[4];
@@ -95,7 +95,7 @@ I2C_WriteRead(&(t->d), data, 4, NULL, 0);
xf86DrvMsg(t->d.pI2CBus->scrnIndex,X_INFO,"TDA9885 setparam: B data: %x, C data: %x, E data: %x\n", data[1], data[2], data[3]);
}
-_X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t)
+void tda9885_dumpstatus(TDA9885Ptr t)
{
xf86DrvMsg(t->d.pI2CBus->scrnIndex,X_INFO,"TDA9885 status: after_reset=%d afc_status=%d (%3.1f kHz off) fm_carrier=%d vif_level=%d afc_win=%d %s\n",
t->after_reset, t->afc_status,
diff --git a/hw/xfree86/i2c/tda9885.h b/hw/xfree86/i2c/tda9885.h
index 08176ba31..004f43d5c 100644
--- a/hw/xfree86/i2c/tda9885.h
+++ b/hw/xfree86/i2c/tda9885.h
@@ -40,15 +40,15 @@ typedef struct {
#define TDA9885_ADDR_4 0x94
#define xf86_Detect_tda9885 Detect_tda9885
-extern TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_tda9885_init tda9885_init
-extern Bool tda9885_init(TDA9885Ptr t);
+extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t);
#define xf86_tda9885_setparameters tda9885_setparameters
-extern void tda9885_setparameters(TDA9885Ptr t);
+extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t);
#define xf86_tda9885_getstatus tda9885_getstatus
-extern void tda9885_getstatus(TDA9885Ptr t);
+extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t);
#define xf86_tda9885_dumpstatus tda9885_dumpstatus
-extern void tda9885_dumpstatus(TDA9885Ptr t);
+extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t);
#define TDA9885SymbolsList \
"Detect_tda9885", \
diff --git a/hw/xfree86/i2c/uda1380.c b/hw/xfree86/i2c/uda1380.c
index deb4bc9cc..defda3cdc 100644
--- a/hw/xfree86/i2c/uda1380.c
+++ b/hw/xfree86/i2c/uda1380.c
@@ -31,7 +31,7 @@
#include "uda1380.h"
#include "i2c_def.h"
-_X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr)
+UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr)
{
UDA1380Ptr t;
I2CByte a;
@@ -74,7 +74,7 @@ _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr)
return t;
}
-_X_EXPORT Bool uda1380_init(UDA1380Ptr t)
+Bool uda1380_init(UDA1380Ptr t)
{
CARD8 data[3];
CARD16 tmp;
@@ -109,7 +109,7 @@ _X_EXPORT Bool uda1380_init(UDA1380Ptr t)
return TRUE;
}
-_X_EXPORT void uda1380_shutdown(UDA1380Ptr t)
+void uda1380_shutdown(UDA1380Ptr t)
{
CARD8 data[3];
Bool ret;
@@ -123,7 +123,7 @@ _X_EXPORT void uda1380_shutdown(UDA1380Ptr t)
xf86DrvMsg(t->d.pI2CBus->scrnIndex,X_INFO,"UDA1380 failed to shutdown\n");
}
-_X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32 value)
+void uda1380_setvolume(UDA1380Ptr t, INT32 value)
{
CARD8 data[3];
/*
@@ -143,7 +143,7 @@ _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32 value)
xf86DrvMsg(t->d.pI2CBus->scrnIndex,X_INFO,"UDA1380 failed to set volume\n");
}
-_X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool mute)
+void uda1380_mute(UDA1380Ptr t, Bool mute)
{
CARD8 data[3];
Bool ret;
@@ -170,14 +170,14 @@ _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool mute)
}
}
-_X_EXPORT void uda1380_getstatus(UDA1380Ptr t)
+void uda1380_getstatus(UDA1380Ptr t)
{
}
-_X_EXPORT void uda1380_setparameters(UDA1380Ptr t)
+void uda1380_setparameters(UDA1380Ptr t)
{
}
-_X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t)
+void uda1380_dumpstatus(UDA1380Ptr t)
{
}
diff --git a/hw/xfree86/i2c/uda1380.h b/hw/xfree86/i2c/uda1380.h
index 825fccd73..da232f90d 100644
--- a/hw/xfree86/i2c/uda1380.h
+++ b/hw/xfree86/i2c/uda1380.h
@@ -45,21 +45,21 @@ typedef struct {
#define UDA1380_ADDR_2 0x34
#define xf86_Detect_uda1380 Detect_uda1380
-extern UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
+extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_uda1380_init uda1380_init
-extern Bool uda1380_init(UDA1380Ptr t);
+extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t);
#define xf86_uda1380_shutdown uda1380_shutdown
-extern void uda1380_shutdown(UDA1380Ptr t);
+extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t);
#define xf86_uda1380_setvolume uda1380_setvolume
-extern void uda1380_setvolume(UDA1380Ptr t, INT32);
+extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32);
#define xf86_uda1380_mute uda1380_mute
-extern void uda1380_mute(UDA1380Ptr t, Bool);
+extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool);
#define xf86_uda1380_setparameters uda1380_setparameters
-extern void uda1380_setparameters(UDA1380Ptr t);
+extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t);
#define xf86_uda1380_getstatus uda1380_getstatus
-extern void uda1380_getstatus(UDA1380Ptr t);
+extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t);
#define xf86_uda1380_dumpstatus uda1380_dumpstatus
-extern void uda1380_dumpstatus(UDA1380Ptr t);
+extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t);
#define UDA1380SymbolsList \
"Detect_uda1380", \
diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c
index c659b1755..59832d6f9 100644
--- a/hw/xfree86/i2c/xf86i2c.c
+++ b/hw/xfree86/i2c/xf86i2c.c
@@ -358,7 +358,7 @@ I2CAddress(I2CDevPtr d, I2CSlaveAddr addr)
* Don't expect a read- or write-only device will respond otherwise.
*/
-_X_EXPORT Bool
+Bool
xf86I2CProbeAddress(I2CBusPtr b, I2CSlaveAddr addr)
{
int r;
@@ -439,7 +439,7 @@ I2CWriteRead(I2CDevPtr d,
/* wrapper - for compatibility and convinience */
-_X_EXPORT Bool
+Bool
xf86I2CWriteRead(I2CDevPtr d,
I2CByte *WriteBuffer, int nWrite,
I2CByte *ReadBuffer, int nRead)
@@ -451,7 +451,7 @@ xf86I2CWriteRead(I2CDevPtr d,
/* Read a byte, the only readable register of a device.
*/
-_X_EXPORT Bool
+Bool
xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte)
{
return xf86I2CWriteRead(d, NULL, 0, pbyte, 1);
@@ -460,7 +460,7 @@ xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte)
/* Read a byte from one of the registers determined by its sub-address.
*/
-_X_EXPORT Bool
+Bool
xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte)
{
return xf86I2CWriteRead(d, &subaddr, 1, pbyte, 1);
@@ -470,7 +470,7 @@ xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte)
* sub-address of the first register.
*/
-_X_EXPORT Bool
+Bool
xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n)
{
return xf86I2CWriteRead(d, &subaddr, 1, pbyte, n);
@@ -480,7 +480,7 @@ xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n)
* determined by its sub-address.
*/
-_X_EXPORT Bool
+Bool
xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword)
{
I2CByte rb[2];
@@ -495,7 +495,7 @@ xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword)
/* Write a byte to one of the registers determined by its sub-address.
*/
-_X_EXPORT Bool
+Bool
xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte)
{
I2CByte wb[2];
@@ -510,7 +510,7 @@ xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte)
* sub-address of the first register.
*/
-_X_EXPORT Bool
+Bool
xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr,
I2CByte *WriteBuffer, int nWrite)
{
@@ -536,7 +536,7 @@ xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr,
* determined by its sub-address.
*/
-_X_EXPORT Bool
+Bool
xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word)
{
I2CByte wb[3];
@@ -555,7 +555,7 @@ xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word)
* remain uninitialized.
*/
-_X_EXPORT Bool
+Bool
xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues)
{
I2CBusPtr b = d->pI2CBus;
@@ -595,7 +595,7 @@ xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues)
* the least significant bit, indicating a read or write access, to zero.
*/
-_X_EXPORT I2CDevPtr
+I2CDevPtr
xf86CreateI2CDevRec(void)
{
return xcalloc(1, sizeof(I2CDevRec));
@@ -605,7 +605,7 @@ xf86CreateI2CDevRec(void)
* you should set <unalloc> to free it.
*/
-_X_EXPORT void
+void
xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc)
{
if (d) {
@@ -640,7 +640,7 @@ xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc)
* the bus-wide defaults. The function returns TRUE on success.
*/
-_X_EXPORT Bool
+Bool
xf86I2CDevInit(I2CDevPtr d)
{
I2CBusPtr b;
@@ -666,7 +666,7 @@ xf86I2CDevInit(I2CDevPtr d)
return TRUE;
}
-_X_EXPORT I2CDevPtr
+I2CDevPtr
xf86I2CFindDev(I2CBusPtr b, I2CSlaveAddr addr)
{
I2CDevPtr d;
@@ -690,7 +690,7 @@ static I2CBusPtr I2CBusList;
* with safe defaults.
*/
-_X_EXPORT I2CBusPtr
+I2CBusPtr
xf86CreateI2CBusRec(void)
{
I2CBusPtr b;
@@ -716,7 +716,7 @@ xf86CreateI2CBusRec(void)
* first, passing down the <unalloc> option.
*/
-_X_EXPORT void
+void
xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
{
if (b) {
@@ -763,7 +763,7 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
* At this point there won't be any traffic on the I2C bus.
*/
-_X_EXPORT Bool
+Bool
xf86I2CBusInit(I2CBusPtr b)
{
/* I2C buses must be identified by a unique scrnIndex
@@ -822,7 +822,7 @@ xf86I2CBusInit(I2CBusPtr b)
return TRUE;
}
-_X_EXPORT I2CBusPtr
+I2CBusPtr
xf86I2CFindBus(int scrnIndex, char *name)
{
I2CBusPtr p;
@@ -840,7 +840,7 @@ xf86I2CFindBus(int scrnIndex, char *name)
* Return an array of I2CBusPtr's related to a screen. The caller is
* responsible for freeing the array.
*/
-_X_EXPORT int
+int
xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus)
{
I2CBusPtr pI2CBus;
diff --git a/hw/xfree86/i2c/xf86i2c.h b/hw/xfree86/i2c/xf86i2c.h
index a3413c9c4..f2ded09db 100644
--- a/hw/xfree86/i2c/xf86i2c.h
+++ b/hw/xfree86/i2c/xf86i2c.h
@@ -50,14 +50,14 @@ typedef struct _I2CBusRec {
} I2CBusRec;
#define CreateI2CBusRec xf86CreateI2CBusRec
-extern I2CBusPtr xf86CreateI2CBusRec(void);
+extern _X_EXPORT I2CBusPtr xf86CreateI2CBusRec(void);
#define DestroyI2CBusRec xf86DestroyI2CBusRec
-extern void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too);
+extern _X_EXPORT void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too);
#define I2CBusInit xf86I2CBusInit
-extern Bool xf86I2CBusInit(I2CBusPtr pI2CBus);
+extern _X_EXPORT Bool xf86I2CBusInit(I2CBusPtr pI2CBus);
-I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name);
-int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus);
+extern _X_EXPORT I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name);
+extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus);
/* I2C slave devices */
@@ -77,30 +77,30 @@ typedef struct _I2CDevRec {
} I2CDevRec;
#define CreateI2CDevRec xf86CreateI2CDevRec
-extern I2CDevPtr xf86CreateI2CDevRec(void);
-void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc);
+extern _X_EXPORT I2CDevPtr xf86CreateI2CDevRec(void);
+extern _X_EXPORT void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc);
#define I2CDevInit xf86I2CDevInit
-extern Bool xf86I2CDevInit(I2CDevPtr pI2CDev);
-I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr);
+extern _X_EXPORT Bool xf86I2CDevInit(I2CDevPtr pI2CDev);
+extern _X_EXPORT I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr);
/* See descriptions of these functions in xf86i2c.c */
#define I2CProbeAddress xf86I2CProbeAddress
-extern Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr);
+extern _X_EXPORT Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr);
#define I2C_WriteRead xf86I2CWriteRead
-extern Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
+extern _X_EXPORT Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
I2CByte *ReadBuffer, int nRead);
#define xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr)
-Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte);
-Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte);
-Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n);
-Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword);
+extern _X_EXPORT Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte);
+extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte);
+extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n);
+extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword);
#define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0)
-Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte);
-Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite);
-Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word);
-Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues);
+extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte);
+extern _X_EXPORT Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite);
+extern _X_EXPORT Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word);
+extern _X_EXPORT Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues);
#endif /*_XF86I2C_H */