#define DDB_MAX_ADAPTER 64
+/****************************************************************************/
+
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);
+struct workqueue_struct *ddb_wq;
+
static struct ddb *ddbs[DDB_MAX_ADAPTER];
/****************************************************************************/
dev_err(dev->dev, "fail1\n");
return -1;
}
+
+void ddb_unmap(struct ddb *dev)
+{
+ if (dev->regs)
+ iounmap(dev->regs);
+ vfree(dev);
+}
/****************************************************************************/
/* 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_DVB_DDBRIDGE_MSIENABLE
-int msi = 1;
+static int msi = 1;
#else
-int msi;
+static int msi;
#endif
module_param(msi, int, 0444);
#ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE
module_param(stv0910_single, int, 0444);
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)
{
ddbwritel(dev, 0, INTERRUPT_ENABLE);
/****************************************************************************/
/* ddbridge-main.c (modparams) */
-extern int adapter_alloc;
-extern int msi;
extern int ci_bitrate;
extern int ts_loop;
extern int xo2_speed;
int ddb_class_create(void);
void ddb_class_destroy(void);
int ddb_init(struct ddb *dev);
+void ddb_unmap(struct ddb *dev);
#endif /* DDBRIDGE_H */