Commit 8e4eef22 authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab

media: ddbridge: move ddb_unmap(), cleanup modparams

adapter_alloc is only used from within ddbridge-core, so move it there,
this removes the need for prototyping/referencing the variable. While at
it, msi isn't needed outside of ddbridge-main, so don't extref that one
aswell.
Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 66cc3d98
...@@ -58,10 +58,21 @@ ...@@ -58,10 +58,21 @@
#define DDB_MAX_ADAPTER 64 #define DDB_MAX_ADAPTER 64
/****************************************************************************/
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
static int adapter_alloc;
module_param(adapter_alloc, int, 0444);
MODULE_PARM_DESC(adapter_alloc,
"0-one adapter per io, 1-one per tab with io, 2-one per tab, 3-one for all");
/****************************************************************************/
DEFINE_MUTEX(redirect_lock); DEFINE_MUTEX(redirect_lock);
struct workqueue_struct *ddb_wq;
static struct ddb *ddbs[DDB_MAX_ADAPTER]; static struct ddb *ddbs[DDB_MAX_ADAPTER];
/****************************************************************************/ /****************************************************************************/
...@@ -3612,3 +3623,10 @@ int ddb_init(struct ddb *dev) ...@@ -3612,3 +3623,10 @@ int ddb_init(struct ddb *dev)
dev_err(dev->dev, "fail1\n"); dev_err(dev->dev, "fail1\n");
return -1; return -1;
} }
void ddb_unmap(struct ddb *dev)
{
if (dev->regs)
iounmap(dev->regs);
vfree(dev);
}
...@@ -41,16 +41,11 @@ ...@@ -41,16 +41,11 @@
/****************************************************************************/ /****************************************************************************/
/* module parameters */ /* module parameters */
int adapter_alloc;
module_param(adapter_alloc, int, 0444);
MODULE_PARM_DESC(adapter_alloc,
"0-one adapter per io, 1-one per tab with io, 2-one per tab, 3-one for all");
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
#ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE #ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE
int msi = 1; static int msi = 1;
#else #else
int msi; static int msi;
#endif #endif
module_param(msi, int, 0444); module_param(msi, int, 0444);
#ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE #ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE
...@@ -88,21 +83,10 @@ int stv0910_single; ...@@ -88,21 +83,10 @@ int stv0910_single;
module_param(stv0910_single, int, 0444); module_param(stv0910_single, int, 0444);
MODULE_PARM_DESC(stv0910_single, "use stv0910 cards as single demods"); MODULE_PARM_DESC(stv0910_single, "use stv0910 cards as single demods");
/****************************************************************************/
struct workqueue_struct *ddb_wq;
/****************************************************************************/ /****************************************************************************/
/****************************************************************************/ /****************************************************************************/
/****************************************************************************/ /****************************************************************************/
static void ddb_unmap(struct ddb *dev)
{
if (dev->regs)
iounmap(dev->regs);
vfree(dev);
}
static void ddb_irq_disable(struct ddb *dev) static void ddb_irq_disable(struct ddb *dev)
{ {
ddbwritel(dev, 0, INTERRUPT_ENABLE); ddbwritel(dev, 0, INTERRUPT_ENABLE);
......
...@@ -369,8 +369,6 @@ int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len); ...@@ -369,8 +369,6 @@ int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);
/****************************************************************************/ /****************************************************************************/
/* ddbridge-main.c (modparams) */ /* ddbridge-main.c (modparams) */
extern int adapter_alloc;
extern int msi;
extern int ci_bitrate; extern int ci_bitrate;
extern int ts_loop; extern int ts_loop;
extern int xo2_speed; extern int xo2_speed;
...@@ -394,5 +392,6 @@ int ddb_device_create(struct ddb *dev); ...@@ -394,5 +392,6 @@ int ddb_device_create(struct ddb *dev);
int ddb_class_create(void); int ddb_class_create(void);
void ddb_class_destroy(void); void ddb_class_destroy(void);
int ddb_init(struct ddb *dev); int ddb_init(struct ddb *dev);
void ddb_unmap(struct ddb *dev);
#endif /* DDBRIDGE_H */ #endif /* DDBRIDGE_H */
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