[IRDA]: kill drivers/net/irda/sir_core.c
EXPORT_SYMBOL's do nowadays belong to the files where the actual functions are. Moving the module_init/module_exit to the file with the actual functions has the advantage of saving a few bytes due to the removal of two functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
79a34648e4
commit
214ad78437
|
@ -45,4 +45,4 @@ obj-$(CONFIG_ACT200L_DONGLE) += act200l-sir.o
|
|||
obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o
|
||||
|
||||
# The SIR helper module
|
||||
sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o
|
||||
sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o
|
||||
|
|
|
@ -133,8 +133,6 @@ extern int sirdev_put_dongle(struct sir_dev *self);
|
|||
|
||||
extern void sirdev_enable_rx(struct sir_dev *dev);
|
||||
extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param);
|
||||
extern int __init irda_thread_create(void);
|
||||
extern void __exit irda_thread_join(void);
|
||||
|
||||
/* inline helpers */
|
||||
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/*********************************************************************
|
||||
*
|
||||
* sir_core.c: module core for irda-sir abstraction layer
|
||||
*
|
||||
* Copyright (c) 2002 Martin Diehl
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <net/irda/irda.h>
|
||||
|
||||
#include "sir-dev.h"
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
|
||||
MODULE_DESCRIPTION("IrDA SIR core");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
EXPORT_SYMBOL(irda_register_dongle);
|
||||
EXPORT_SYMBOL(irda_unregister_dongle);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_get_instance);
|
||||
EXPORT_SYMBOL(sirdev_put_instance);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_set_dongle);
|
||||
EXPORT_SYMBOL(sirdev_write_complete);
|
||||
EXPORT_SYMBOL(sirdev_receive);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_raw_write);
|
||||
EXPORT_SYMBOL(sirdev_raw_read);
|
||||
EXPORT_SYMBOL(sirdev_set_dtr_rts);
|
||||
|
||||
static int __init sir_core_init(void)
|
||||
{
|
||||
return irda_thread_create();
|
||||
}
|
||||
|
||||
static void __exit sir_core_exit(void)
|
||||
{
|
||||
irda_thread_join();
|
||||
}
|
||||
|
||||
module_init(sir_core_init);
|
||||
module_exit(sir_core_exit);
|
||||
|
|
@ -60,6 +60,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
|
|||
up(&dev->fsm.sem);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_set_dongle);
|
||||
|
||||
/* used by dongle drivers for dongle programming */
|
||||
|
||||
|
@ -94,6 +95,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
|
|||
spin_unlock_irqrestore(&dev->tx_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_raw_write);
|
||||
|
||||
/* seems some dongle drivers may need this */
|
||||
|
||||
|
@ -116,6 +118,7 @@ int sirdev_raw_read(struct sir_dev *dev, char *buf, int len)
|
|||
|
||||
return count;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_raw_read);
|
||||
|
||||
int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
|
||||
{
|
||||
|
@ -124,7 +127,8 @@ int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
|
|||
ret = dev->drv->set_dtr_rts(dev, dtr, rts);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(sirdev_set_dtr_rts);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/* called from client driver - likely with bh-context - to indicate
|
||||
|
@ -227,6 +231,7 @@ void sirdev_write_complete(struct sir_dev *dev)
|
|||
done:
|
||||
spin_unlock_irqrestore(&dev->tx_lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_write_complete);
|
||||
|
||||
/* called from client driver - likely with bh-context - to give us
|
||||
* some more received bytes. We put them into the rx-buffer,
|
||||
|
@ -279,6 +284,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_receive);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
@ -641,6 +647,7 @@ out_freenetdev:
|
|||
out:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_get_instance);
|
||||
|
||||
int sirdev_put_instance(struct sir_dev *dev)
|
||||
{
|
||||
|
@ -673,4 +680,5 @@ int sirdev_put_instance(struct sir_dev *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_put_instance);
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ int irda_register_dongle(struct dongle_driver *new)
|
|||
up(&dongle_list_lock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(irda_register_dongle);
|
||||
|
||||
int irda_unregister_dongle(struct dongle_driver *drv)
|
||||
{
|
||||
|
@ -58,6 +59,7 @@ int irda_unregister_dongle(struct dongle_driver *drv)
|
|||
up(&dongle_list_lock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(irda_unregister_dongle);
|
||||
|
||||
int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type)
|
||||
{
|
||||
|
|
|
@ -466,7 +466,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __init irda_thread_create(void)
|
||||
static int __init irda_thread_create(void)
|
||||
{
|
||||
struct completion startup;
|
||||
int pid;
|
||||
|
@ -488,7 +488,7 @@ int __init irda_thread_create(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void __exit irda_thread_join(void)
|
||||
static void __exit irda_thread_join(void)
|
||||
{
|
||||
if (irda_rq_queue.thread) {
|
||||
flush_irda_queue();
|
||||
|
@ -499,3 +499,10 @@ void __exit irda_thread_join(void)
|
|||
}
|
||||
}
|
||||
|
||||
module_init(irda_thread_create);
|
||||
module_exit(irda_thread_join);
|
||||
|
||||
MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
|
||||
MODULE_DESCRIPTION("IrDA SIR core");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
|
|
Loading…
Reference in a new issue