Commit 54060547 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by David S. Miller

[IRDA]: remove unneeded EXPORT_SYMBOL's from irport.c

	<Patch from Adrian Bunk>
make needlessly global code static
remove unneeded EXPORT_SYMBOL's from irport.c
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarJean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 47652ae9
......@@ -87,50 +87,14 @@ static struct net_device_stats *irport_net_get_stats(struct net_device *dev);
static int irport_change_speed_complete(struct irda_task *task);
static void irport_timeout(struct net_device *dev);
EXPORT_SYMBOL(irport_open);
EXPORT_SYMBOL(irport_close);
EXPORT_SYMBOL(irport_start);
EXPORT_SYMBOL(irport_stop);
EXPORT_SYMBOL(irport_interrupt);
EXPORT_SYMBOL(irport_hard_xmit);
EXPORT_SYMBOL(irport_timeout);
EXPORT_SYMBOL(irport_change_speed);
EXPORT_SYMBOL(irport_net_open);
EXPORT_SYMBOL(irport_net_close);
static int __init irport_init(void)
{
int i;
for (i=0; (io[i] < 2000) && (i < 4); i++) {
if (irport_open(i, io[i], irq[i]) != NULL)
return 0;
}
/*
* Maybe something failed, but we can still be usable for FIR drivers
*/
return 0;
}
/*
* Function irport_cleanup ()
*
* Close all configured ports
*
*/
static void __exit irport_cleanup(void)
{
int i;
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
for (i=0; i < 4; i++) {
if (dev_self[i])
irport_close(dev_self[i]);
}
}
struct irport_cb *
static irqreturn_t irport_interrupt(int irq, void *dev_id,
struct pt_regs *regs);
static int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev);
static void irport_change_speed(void *priv, __u32 speed);
static int irport_net_open(struct net_device *dev);
static int irport_net_close(struct net_device *dev);
static struct irport_cb *
irport_open(int i, unsigned int iobase, unsigned int irq)
{
struct net_device *dev;
......@@ -254,7 +218,7 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
return NULL;
}
int irport_close(struct irport_cb *self)
static int irport_close(struct irport_cb *self)
{
ASSERT(self != NULL, return -1;);
......@@ -285,40 +249,40 @@ int irport_close(struct irport_cb *self)
return 0;
}
void irport_start(struct irport_cb *self)
static void irport_stop(struct irport_cb *self)
{
int iobase;
iobase = self->io.sir_base;
irport_stop(self);
/* We can't lock, we may be called from a FIR driver - Jean II */
/* Initialize UART */
outb(UART_LCR_WLEN8, iobase+UART_LCR); /* Reset DLAB */
outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR);
/* We are not transmitting any more */
self->transmitting = 0;
/* Reset UART */
outb(0, iobase+UART_MCR);
/* Turn on interrups */
outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, iobase+UART_IER);
/* Turn off interrupts */
outb(0, iobase+UART_IER);
}
void irport_stop(struct irport_cb *self)
static void irport_start(struct irport_cb *self)
{
int iobase;
iobase = self->io.sir_base;
irport_stop(self);
/* We can't lock, we may be called from a FIR driver - Jean II */
/* We are not transmitting any more */
self->transmitting = 0;
/* Reset UART */
outb(0, iobase+UART_MCR);
/* Initialize UART */
outb(UART_LCR_WLEN8, iobase+UART_LCR); /* Reset DLAB */
outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR);
/* Turn off interrupts */
outb(0, iobase+UART_IER);
/* Turn on interrups */
outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, iobase+UART_IER);
}
/*
......@@ -368,7 +332,7 @@ static inline unsigned int irport_get_fcr(__u32 speed)
*
* This function should be called with irq off and spin-lock.
*/
void irport_change_speed(void *priv, __u32 speed)
static void irport_change_speed(void *priv, __u32 speed)
{
struct irport_cb *self = (struct irport_cb *) priv;
int iobase;
......@@ -619,7 +583,7 @@ static void irport_wait_hw_transmitter_finish(struct irport_cb *self)
* waits until the next transmitt interrupt, and continues until the
* frame is transmitted.
*/
int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev)
static int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct irport_cb *self;
unsigned long flags;
......@@ -814,7 +778,8 @@ static inline void irport_receive(struct irport_cb *self)
*
* Interrupt handler
*/
irqreturn_t irport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t irport_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
struct irport_cb *self;
......@@ -888,7 +853,7 @@ irqreturn_t irport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* Network device is taken up. Usually this is done by "ifconfig irda0 up"
*
*/
int irport_net_open(struct net_device *dev)
static int irport_net_open(struct net_device *dev)
{
struct irport_cb *self;
int iobase;
......@@ -941,7 +906,7 @@ int irport_net_open(struct net_device *dev)
* Network device is taken down. Usually this is done by
* "ifconfig irda0 down"
*/
int irport_net_close(struct net_device *dev)
static int irport_net_close(struct net_device *dev)
{
struct irport_cb *self;
int iobase;
......@@ -1134,6 +1099,38 @@ static struct net_device_stats *irport_net_get_stats(struct net_device *dev)
return &self->stats;
}
static int __init irport_init(void)
{
int i;
for (i=0; (io[i] < 2000) && (i < 4); i++) {
if (irport_open(i, io[i], irq[i]) != NULL)
return 0;
}
/*
* Maybe something failed, but we can still be usable for FIR drivers
*/
return 0;
}
/*
* Function irport_cleanup ()
*
* Close all configured ports
*
*/
static void __exit irport_cleanup(void)
{
int i;
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
for (i=0; i < 4; i++) {
if (dev_self[i])
irport_close(dev_self[i]);
}
}
MODULE_PARM(io, "1-4i");
MODULE_PARM_DESC(io, "Base I/O addresses");
MODULE_PARM(irq, "1-4i");
......
......@@ -77,14 +77,4 @@ struct irport_cb {
int (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
};
struct irport_cb *irport_open(int i, unsigned int iobase, unsigned int irq);
int irport_close(struct irport_cb *self);
void irport_start(struct irport_cb *self);
void irport_stop(struct irport_cb *self);
void irport_change_speed(void *priv, __u32 speed);
irqreturn_t irport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev);
int irport_net_open(struct net_device *dev);
int irport_net_close(struct net_device *dev);
#endif /* IRPORT_H */
......@@ -413,7 +413,7 @@ static int irtty_stop_dev(struct sir_dev *dev)
/* ------------------------------------------------------- */
struct sir_driver sir_tty_drv = {
static struct sir_driver sir_tty_drv = {
.owner = THIS_MODULE,
.driver_name = "sir_tty",
.start_dev = irtty_start_dev,
......
......@@ -203,7 +203,7 @@ static int smsc_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data);
/* Transceivers for SMSC-ircc */
smsc_transceiver_t smsc_transceivers[]=
static smsc_transceiver_t smsc_transceivers[]=
{
{ "Toshiba Satellite 1800 (GP data pin select)", smsc_ircc_set_transceiver_toshiba_sat1800, smsc_ircc_probe_transceiver_toshiba_sat1800},
{ "Fast pin select", smsc_ircc_set_transceiver_smsc_ircc_fast_pin_select, smsc_ircc_probe_transceiver_smsc_ircc_fast_pin_select},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment