Skip to contentSkip to conversation

ddbridge: updates from dddvb-0.9.31

PATCH New Daniel Scheller 1 participant 7 messages Aug 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ddbridge: updates from dddvb-0.9.31

From: Daniel Scheller <[email protected]>

Digital Devices bumped their driver package to version 0.9.31, which most importantly carries all refactorisations which are part of the pending mainline driver bump (bringing dddvb and the proposed kernel version much closer to each other), and improves further on that. This series bumps the mainline driver accordingly.

These patches should go in right after and alongside the ddbridge-0.9.29 v4 bump series (see [1], means: 4.14 window material) so we have an uptodate driver in mainline when the next major version gets tagged by Linus.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

Daniel Scheller (6):
[media] ddbridge: fix gap handling
[media] ddbridge: move ddb_unmap(), cleanup modparams [media] ddbridge: move device ID table to ddbridge-hw [media] ddbridge: remove ddb_info's from the global scope [media] ddbridge: const'ify all ddb_info, ddb_regmap et al [media] ddbridge: bump version string to 0.9.31intermediate-integrated

 drivers/media/pci/ddbridge/ddbridge-core.c |  46 +++++++---
 drivers/media/pci/ddbridge/ddbridge-hw.c   | 129 ++++++++++++++++++++++-------
 drivers/media/pci/ddbridge/ddbridge-hw.h   |  45 ++++------
 drivers/media/pci/ddbridge/ddbridge-i2c.c  |   5 +-
 drivers/media/pci/ddbridge/ddbridge-main.c |  67 ++-------------
 drivers/media/pci/ddbridge/ddbridge.h      |  27 +++---
 6 files changed, 172 insertions(+), 147 deletions(-)
Signature · 1 line
2.13.0
#1 lore raw

PATCH 1/6 ddbridge: fix gap handling

From: Daniel Scheller <[email protected]>

Force gap setting if given by attribute and enable gap for older regmaps. Also, setting a gap value of 128 via sysfs will now disable gap.

---
 drivers/media/pci/ddbridge/ddbridge-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/media/pci/ddbridge/ddbridge-core.c +5 -1
index c290d3fecc8d..98a12c644e44 100644
@@ -336,6 +336,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
 	if (output->port->gap != 0xffffffff) {
 		flags |= 1;
 		gap = output->port->gap;
+		max_bitrate = 0;
 	}
 	if (dev->link[0].info->type == DDB_OCTOPUS_CI && output->port->nr > 1) {
 		*con = 0x10c;
@@ -372,6 +373,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
 				*con |= 0x810; /* 96 MBit/s and gap */
 				max_bitrate = 96000;
 			}
+			*con |= 0x10; /* enable gap */
 		}
 	}
 	if (max_bitrate > 0) {
@@ -3203,8 +3205,10 @@ static ssize_t gap_store(struct device *device, struct device_attribute *attr,
 
 	if (sscanf(buf, "%u\n", &val) != 1)
 		return -EINVAL;
-	if (val > 20)
+	if (val > 128)
 		return -EINVAL;
+	if (val == 128)
+		val = 0xffffffff;
 	dev->port[num].gap = val;
 	return count;
 }
Signature · 1 line
2.13.0
#2 lore raw

PATCH 2/6 ddbridge: move ddb_unmap(), cleanup modparams

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

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.

---
 drivers/media/pci/ddbridge/ddbridge-core.c | 18 ++++++++++++++++++
 drivers/media/pci/ddbridge/ddbridge-main.c | 20 ++------------------
 drivers/media/pci/ddbridge/ddbridge.h      |  3 +--
 3 files changed, 21 insertions(+), 20 deletions(-)
drivers/media/pci/ddbridge/ddbridge-core.c +18 -0
index 98a12c644e44..070e382db9ad 100644
@@ -58,10 +58,21 @@
 
 #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];
 
 /****************************************************************************/
@@ -3612,3 +3623,10 @@ int ddb_init(struct ddb *dev)
 	dev_err(dev->dev, "fail1\n");
 	return -1;
 }
+
+void ddb_unmap(struct ddb *dev)
+{
+	if (dev->regs)
+		iounmap(dev->regs);
+	vfree(dev);
+}
drivers/media/pci/ddbridge/ddbridge-main.c +2 -18
index 3cb6bb265172..25e9bd7d4fc1 100644
@@ -41,16 +41,11 @@
 /****************************************************************************/
 /* 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
@@ -89,20 +84,9 @@ 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);
drivers/media/pci/ddbridge/ddbridge.h +1 -2
index 91b58eff951c..9ca94a4f82ee 100644
@@ -369,8 +369,6 @@ int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);
 /****************************************************************************/
 
 /* ddbridge-main.c (modparams) */
-extern int adapter_alloc;
-extern int msi;
 extern int ci_bitrate;
 extern int ts_loop;
 extern int xo2_speed;
@@ -394,5 +392,6 @@ int ddb_device_create(struct ddb *dev);
 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 */
Signature · 1 line
2.13.0
#3 lore raw

PATCH 3/6 ddbridge: move device ID table to ddbridge-hw

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

This further cleans up ddbridge-main from hardware-related data and moves the exact card type determination into ddbridge-hw.c:get_ddb_info(), right to the hardware maps/structs. Also, const'ify more structs and pointers.

---
 drivers/media/pci/ddbridge/ddbridge-core.c |  8 ++--
 drivers/media/pci/ddbridge/ddbridge-hw.c   | 65 ++++++++++++++++++++++++++++++
 drivers/media/pci/ddbridge/ddbridge-hw.h   | 19 +++++++++
 drivers/media/pci/ddbridge/ddbridge-main.c | 47 ++++-----------------
 drivers/media/pci/ddbridge/ddbridge.h      |  2 +-
 5 files changed, 96 insertions(+), 45 deletions(-)
drivers/media/pci/ddbridge/ddbridge-core.c +4 -4
index 070e382db9ad..5f6367fee586 100644
@@ -2441,7 +2441,7 @@ static void output_handler(unsigned long data)
 
 static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
 {
-	struct ddb_info *info;
+	const struct ddb_info *info;
 
 	if (link)
 		info = io->port->dev->link[io->port->lnr].info;
@@ -2575,7 +2575,7 @@ void ddb_ports_init(struct ddb *dev)
 {
 	u32 i, l, p;
 	struct ddb_port *port;
-	struct ddb_info *info;
+	const struct ddb_info *info;
 	struct ddb_regmap *rm;
 
 	for (p = l = 0; l < DDB_MAX_LINK; l++) {
@@ -3538,7 +3538,7 @@ static int tempmon_init(struct ddb_link *link, int first_time)
 
 static int ddb_init_tempmon(struct ddb_link *link)
 {
-	struct ddb_info *info = link->info;
+	const struct ddb_info *info = link->info;
 
 	if (!info->tempmon_irq)
 		return 0;
@@ -3556,7 +3556,7 @@ static int ddb_init_tempmon(struct ddb_link *link)
 
 static int ddb_init_boards(struct ddb *dev)
 {
-	struct ddb_info *info;
+	const struct ddb_info *info;
 	struct ddb_link *link;
 	u32 l;
 
drivers/media/pci/ddbridge/ddbridge-hw.c +65 -0

74 lines not on this page · raw message

drivers/media/pci/ddbridge/ddbridge-hw.h +19 -0
index d26cd9c977d8..1a985d0a1a97 100644
@@ -23,6 +23,20 @@
 
 /******************************************************************************/
 
+#define DDVID 0xdd01 /* Digital Devices Vendor ID */
+
+/******************************************************************************/
+
+struct ddb_device_id {
+	u16 vendor;
+	u16 device;
+	u16 subvendor;
+	u16 subdevice;
+	const struct ddb_info *info;
+};
+
+/******************************************************************************/
+
 extern const struct ddb_info ddb_none;
 extern const struct ddb_info ddb_octopus;
 extern const struct ddb_info ddb_octopusv3;
@@ -53,4 +67,9 @@ extern const struct ddb_info ddb_c2t2i_8;
 
 extern const struct ddb_info ddb_s2_48;
 
+/****************************************************************************/
+
+const struct ddb_info *get_ddb_info(u16 vendor, u16 device,
+				    u16 subvendor, u16 subdevice);
+
 #endif /* _DDBRIDGE_HW_H */
drivers/media/pci/ddbridge/ddbridge-main.c +7 -40

63 lines not on this page · raw message

drivers/media/pci/ddbridge/ddbridge.h +1 -1
index 9ca94a4f82ee..d890400dc1c3 100644
@@ -307,7 +307,7 @@ struct ddb_lnb {
 
 struct ddb_link {
 	struct ddb            *dev;
-	struct ddb_info       *info;
+	const struct ddb_info *info;
 	u32                    nr;
 	u32                    regs;
 	spinlock_t             lock;
Signature · 1 line
2.13.0
#4 lore raw

PATCH 4/6 ddbridge: remove ddb_info's from the global scope

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

Since the DD hardware info and maps aren't needed anymore outside of ddbridge-hw.c (they're returned via get_ddb_info() now), mark them static and remove all refs from ddbridge-hw.h.

---
 drivers/media/pci/ddbridge/ddbridge-hw.c | 46 ++++++++++++++++----------------
 drivers/media/pci/ddbridge/ddbridge-hw.h | 32 ----------------------
 2 files changed, 23 insertions(+), 55 deletions(-)
drivers/media/pci/ddbridge/ddbridge-hw.c +23 -23
index 3b208d5bf4ad..1c25e86c189e 100644
@@ -87,13 +87,13 @@ static struct ddb_regmap octopus_map = {
 
 /****************************************************************************/
 
-const struct ddb_info ddb_none = {
+static const struct ddb_info ddb_none = {
 	.type     = DDB_NONE,
 	.name     = "unknown Digital Devices PCIe card, install newer driver",
 	.regmap   = &octopus_map,
 };
 
-const struct ddb_info ddb_octopus = {
+static const struct ddb_info ddb_octopus = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Octopus DVB adapter",
 	.regmap   = &octopus_map,
@@ -101,7 +101,7 @@ const struct ddb_info ddb_octopus = {
 	.i2c_mask = 0x0f,
 };
 
-const struct ddb_info ddb_octopusv3 = {
+static const struct ddb_info ddb_octopusv3 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Octopus V3 DVB adapter",
 	.regmap   = &octopus_map,
@@ -109,7 +109,7 @@ const struct ddb_info ddb_octopusv3 = {
 	.i2c_mask = 0x0f,
 };
 
-const struct ddb_info ddb_octopus_le = {
+static const struct ddb_info ddb_octopus_le = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Octopus LE DVB adapter",
 	.regmap   = &octopus_map,
@@ -117,7 +117,7 @@ const struct ddb_info ddb_octopus_le = {
 	.i2c_mask = 0x03,
 };
 
-const struct ddb_info ddb_octopus_oem = {
+static const struct ddb_info ddb_octopus_oem = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Octopus OEM",
 	.regmap   = &octopus_map,
@@ -129,7 +129,7 @@ const struct ddb_info ddb_octopus_oem = {
 	.temp_bus = 0,
 };
 
-const struct ddb_info ddb_octopus_mini = {
+static const struct ddb_info ddb_octopus_mini = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Octopus Mini",
 	.regmap   = &octopus_map,
@@ -137,7 +137,7 @@ const struct ddb_info ddb_octopus_mini = {
 	.i2c_mask = 0x0f,
 };
 
-const struct ddb_info ddb_v6 = {
+static const struct ddb_info ddb_v6 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Cine S2 V6 DVB adapter",
 	.regmap   = &octopus_map,
@@ -145,7 +145,7 @@ const struct ddb_info ddb_v6 = {
 	.i2c_mask = 0x07,
 };
 
-const struct ddb_info ddb_v6_5 = {
+static const struct ddb_info ddb_v6_5 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Cine S2 V6.5 DVB adapter",
 	.regmap   = &octopus_map,
@@ -153,7 +153,7 @@ const struct ddb_info ddb_v6_5 = {
 	.i2c_mask = 0x0f,
 };
 
-const struct ddb_info ddb_v7 = {
+static const struct ddb_info ddb_v7 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Cine S2 V7 DVB adapter",
 	.regmap   = &octopus_map,
@@ -164,7 +164,7 @@ const struct ddb_info ddb_v7 = {
 	.ts_quirks = TS_QUIRK_REVERSED,
 };
 
-const struct ddb_info ddb_v7a = {
+static const struct ddb_info ddb_v7a = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Cine S2 V7 Advanced DVB adapter",
 	.regmap   = &octopus_map,
@@ -175,7 +175,7 @@ const struct ddb_info ddb_v7a = {
 	.ts_quirks = TS_QUIRK_REVERSED,
 };
 
-const struct ddb_info ddb_ctv7 = {
+static const struct ddb_info ddb_ctv7 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices Cine CT V7 DVB adapter",
 	.regmap   = &octopus_map,
@@ -185,7 +185,7 @@ const struct ddb_info ddb_ctv7 = {
 	.board_control_2 = 4,
 };
 
-const struct ddb_info ddb_satixS2v3 = {
+static const struct ddb_info ddb_satixS2v3 = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Mystique SaTiX-S2 V3 DVB adapter",
 	.regmap   = &octopus_map,
@@ -193,7 +193,7 @@ const struct ddb_info ddb_satixS2v3 = {
 	.i2c_mask = 0x07,
 };
 
-const struct ddb_info ddb_ci = {
+static const struct ddb_info ddb_ci = {
 	.type     = DDB_OCTOPUS_CI,
 	.name     = "Digital Devices Octopus CI",
 	.regmap   = &octopus_map,
@@ -201,7 +201,7 @@ const struct ddb_info ddb_ci = {
 	.i2c_mask = 0x03,
 };
 
-const struct ddb_info ddb_cis = {
+static const struct ddb_info ddb_cis = {
 	.type     = DDB_OCTOPUS_CI,
 	.name     = "Digital Devices Octopus CI single",
 	.regmap   = &octopus_map,
@@ -209,7 +209,7 @@ const struct ddb_info ddb_cis = {
 	.i2c_mask = 0x03,
 };
 
-const struct ddb_info ddb_ci_s2_pro = {
+static const struct ddb_info ddb_ci_s2_pro = {
 	.type     = DDB_OCTOPUS_CI,
 	.name     = "Digital Devices Octopus CI S2 Pro",
 	.regmap   = &octopus_map,
@@ -219,7 +219,7 @@ const struct ddb_info ddb_ci_s2_pro = {
 	.board_control_2 = 4,
 };
 
-const struct ddb_info ddb_ci_s2_pro_a = {
+static const struct ddb_info ddb_ci_s2_pro_a = {
 	.type     = DDB_OCTOPUS_CI,
 	.name     = "Digital Devices Octopus CI S2 Pro Advanced",
 	.regmap   = &octopus_map,
@@ -229,7 +229,7 @@ const struct ddb_info ddb_ci_s2_pro_a = {
 	.board_control_2 = 4,
 };
 
-const struct ddb_info ddb_dvbct = {
+static const struct ddb_info ddb_dvbct = {
 	.type     = DDB_OCTOPUS,
 	.name     = "Digital Devices DVBCT V6.1 DVB adapter",
 	.regmap   = &octopus_map,
@@ -239,7 +239,7 @@ const struct ddb_info ddb_dvbct = {
 
 /****************************************************************************/
 
-const struct ddb_info ddb_ct2_8 = {
+static const struct ddb_info ddb_ct2_8 = {
 	.type     = DDB_OCTOPUS_MAX_CT,
 	.name     = "Digital Devices MAX A8 CT2",
 	.regmap   = &octopus_map,
@@ -251,7 +251,7 @@ const struct ddb_info ddb_ct2_8 = {
 	.tempmon_irq = 24,
 };
 
-const struct ddb_info ddb_c2t2_8 = {
+static const struct ddb_info ddb_c2t2_8 = {
 	.type     = DDB_OCTOPUS_MAX_CT,
 	.name     = "Digital Devices MAX A8 C2T2",
 	.regmap   = &octopus_map,
@@ -263,7 +263,7 @@ const struct ddb_info ddb_c2t2_8 = {
 	.tempmon_irq = 24,
 };
 
-const struct ddb_info ddb_isdbt_8 = {
+static const struct ddb_info ddb_isdbt_8 = {
 	.type     = DDB_OCTOPUS_MAX_CT,
 	.name     = "Digital Devices MAX A8 ISDBT",
 	.regmap   = &octopus_map,
@@ -275,7 +275,7 @@ const struct ddb_info ddb_isdbt_8 = {
 	.tempmon_irq = 24,
 };
 
-const struct ddb_info ddb_c2t2i_v0_8 = {
+static const struct ddb_info ddb_c2t2i_v0_8 = {
 	.type     = DDB_OCTOPUS_MAX_CT,
 	.name     = "Digital Devices MAX A8 C2T2I V0",
 	.regmap   = &octopus_map,
@@ -287,7 +287,7 @@ const struct ddb_info ddb_c2t2i_v0_8 = {
 	.tempmon_irq = 24,
 };
 
-const struct ddb_info ddb_c2t2i_8 = {
+static const struct ddb_info ddb_c2t2i_8 = {
 	.type     = DDB_OCTOPUS_MAX_CT,
 	.name     = "Digital Devices MAX A8 C2T2I",
 	.regmap   = &octopus_map,
@@ -301,7 +301,7 @@ const struct ddb_info ddb_c2t2i_8 = {
 
 /****************************************************************************/
 
-const struct ddb_info ddb_s2_48 = {
+static const struct ddb_info ddb_s2_48 = {
 	.type     = DDB_OCTOPUS_MAX,
 	.name     = "Digital Devices MAX S8 4/8",
 	.regmap   = &octopus_map,
drivers/media/pci/ddbridge/ddbridge-hw.h +0 -32
index 1a985d0a1a97..7c142419419c 100644
@@ -37,38 +37,6 @@ struct ddb_device_id {
 
 /******************************************************************************/
 
-extern const struct ddb_info ddb_none;
-extern const struct ddb_info ddb_octopus;
-extern const struct ddb_info ddb_octopusv3;
-extern const struct ddb_info ddb_octopus_le;
-extern const struct ddb_info ddb_octopus_oem;
-extern const struct ddb_info ddb_octopus_mini;
-extern const struct ddb_info ddb_v6;
-extern const struct ddb_info ddb_v6_5;
-extern const struct ddb_info ddb_v7;
-extern const struct ddb_info ddb_v7a;
-extern const struct ddb_info ddb_ctv7;
-extern const struct ddb_info ddb_satixS2v3;
-extern const struct ddb_info ddb_ci;
-extern const struct ddb_info ddb_cis;
-extern const struct ddb_info ddb_ci_s2_pro;
-extern const struct ddb_info ddb_ci_s2_pro_a;
-extern const struct ddb_info ddb_dvbct;
-
-/****************************************************************************/
-
-extern const struct ddb_info ddb_ct2_8;
-extern const struct ddb_info ddb_c2t2_8;
-extern const struct ddb_info ddb_isdbt_8;
-extern const struct ddb_info ddb_c2t2i_v0_8;
-extern const struct ddb_info ddb_c2t2i_8;
-
-/****************************************************************************/
-
-extern const struct ddb_info ddb_s2_48;
-
-/****************************************************************************/
-
 const struct ddb_info *get_ddb_info(u16 vendor, u16 device,
 				    u16 subvendor, u16 subdevice);
 
Signature · 1 line
2.13.0
#5 lore raw

PATCH 5/6 ddbridge: const'ify all ddb_info, ddb_regmap et al

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

All data is accessed RO, so mark everything const. Some vars in several functions aswell as function signatures also require the const keyword now, they're also added by this commit.

---
 drivers/media/pci/ddbridge/ddbridge-core.c | 14 +++++++-------
 drivers/media/pci/ddbridge/ddbridge-hw.c   | 18 +++++++++---------
 drivers/media/pci/ddbridge/ddbridge-i2c.c  |  5 +++--
 drivers/media/pci/ddbridge/ddbridge.h      | 20 ++++++++++----------
 4 files changed, 29 insertions(+), 28 deletions(-)
drivers/media/pci/ddbridge/ddbridge-core.c +7 -7
index 5f6367fee586..a14031ac45cf 100644
@@ -2439,7 +2439,7 @@ static void output_handler(unsigned long data)
 /****************************************************************************/
 /****************************************************************************/
 
-static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
+static const struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
 {
 	const struct ddb_info *info;
 
@@ -2457,7 +2457,7 @@ static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
 static void ddb_dma_init(struct ddb_io *io, int nr, int out)
 {
 	struct ddb_dma *dma;
-	struct ddb_regmap *rm = io_regmap(io, 0);
+	const struct ddb_regmap *rm = io_regmap(io, 0);
 
 	dma = out ? &io->port->dev->odma[nr] : &io->port->dev->idma[nr];
 	io->dma = dma;
@@ -2488,7 +2488,7 @@ static void ddb_input_init(struct ddb_port *port, int nr, int pnr, int anr)
 {
 	struct ddb *dev = port->dev;
 	struct ddb_input *input = &dev->input[anr];
-	struct ddb_regmap *rm;
+	const struct ddb_regmap *rm;
 
 	port->input[pnr] = input;
 	input->nr = nr;
@@ -2500,7 +2500,7 @@ static void ddb_input_init(struct ddb_port *port, int nr, int pnr, int anr)
 		port->lnr, nr, input->regs);
 
 	if (dev->has_dma) {
-		struct ddb_regmap *rm0 = io_regmap(input, 0);
+		const struct ddb_regmap *rm0 = io_regmap(input, 0);
 		u32 base = rm0->irq_base_idma;
 		u32 dma_nr = nr;
 
@@ -2520,7 +2520,7 @@ static void ddb_output_init(struct ddb_port *port, int nr)
 {
 	struct ddb *dev = port->dev;
 	struct ddb_output *output = &dev->output[nr];
-	struct ddb_regmap *rm;
+	const struct ddb_regmap *rm;
 
 	port->output = output;
 	output->nr = nr;
@@ -2533,7 +2533,7 @@ static void ddb_output_init(struct ddb_port *port, int nr)
 		 port->lnr, nr, output->regs);
 
 	if (dev->has_dma) {
-		struct ddb_regmap *rm0 = io_regmap(output, 0);
+		const struct ddb_regmap *rm0 = io_regmap(output, 0);
 		u32 base = rm0->irq_base_odma;
 
 		dev->handler[0][nr + base] = output_handler;
@@ -2576,7 +2576,7 @@ void ddb_ports_init(struct ddb *dev)
 	u32 i, l, p;
 	struct ddb_port *port;
 	const struct ddb_info *info;
-	struct ddb_regmap *rm;
+	const struct ddb_regmap *rm;
 
 	for (p = l = 0; l < DDB_MAX_LINK; l++) {
 		info = dev->link[l].info;
drivers/media/pci/ddbridge/ddbridge-hw.c +9 -9
index 1c25e86c189e..48248bcd59c2 100644
@@ -21,49 +21,49 @@
 
 /******************************************************************************/
 
-static struct ddb_regset octopus_input = {
+static const struct ddb_regset octopus_input = {
 	.base = 0x200,
 	.num  = 0x08,
 	.size = 0x10,
 };
 
-static struct ddb_regset octopus_output = {
+static const struct ddb_regset octopus_output = {
 	.base = 0x280,
 	.num  = 0x08,
 	.size = 0x10,
 };
 
-static struct ddb_regset octopus_idma = {
+static const struct ddb_regset octopus_idma = {
 	.base = 0x300,
 	.num  = 0x08,
 	.size = 0x10,
 };
 
-static struct ddb_regset octopus_idma_buf = {
+static const struct ddb_regset octopus_idma_buf = {
 	.base = 0x2000,
 	.num  = 0x08,
 	.size = 0x100,
 };
 
-static struct ddb_regset octopus_odma = {
+static const struct ddb_regset octopus_odma = {
 	.base = 0x380,
 	.num  = 0x04,
 	.size = 0x10,
 };
 
-static struct ddb_regset octopus_odma_buf = {
+static const struct ddb_regset octopus_odma_buf = {
 	.base = 0x2800,
 	.num  = 0x04,
 	.size = 0x100,
 };
 
-static struct ddb_regset octopus_i2c = {
+static const struct ddb_regset octopus_i2c = {
 	.base = 0x80,
 	.num  = 0x04,
 	.size = 0x20,
 };
 
-static struct ddb_regset octopus_i2c_buf = {
+static const struct ddb_regset octopus_i2c_buf = {
 	.base = 0x1000,
 	.num  = 0x04,
 	.size = 0x200,
@@ -71,7 +71,7 @@ static struct ddb_regset octopus_i2c_buf = {
 
 /****************************************************************************/
 
-static struct ddb_regmap octopus_map = {
+static const struct ddb_regmap octopus_map = {
 	.irq_base_i2c = 0,
 	.irq_base_idma = 8,
 	.irq_base_odma = 16,
drivers/media/pci/ddbridge/ddbridge-i2c.c +3 -2
index 3d4fafb5db27..e4d39c3270ae 100644
@@ -155,7 +155,8 @@ static void i2c_handler(unsigned long priv)
 }
 
 static int ddb_i2c_add(struct ddb *dev, struct ddb_i2c *i2c,
-		       struct ddb_regmap *regmap, int link, int i, int num)
+		       const struct ddb_regmap *regmap, int link,
+		       int i, int num)
 {
 	struct i2c_adapter *adap;
 
@@ -196,7 +197,7 @@ int ddb_i2c_init(struct ddb *dev)
 	u32 i, j, num = 0, l, base;
 	struct ddb_i2c *i2c;
 	struct i2c_adapter *adap;
-	struct ddb_regmap *regmap;
+	const struct ddb_regmap *regmap;
 
 	for (l = 0; l < DDB_MAX_LINK; l++) {
 		if (!dev->link[l].info)
drivers/media/pci/ddbridge/ddbridge.h +10 -10
index d890400dc1c3..c1a1edfe15aa 100644
@@ -85,17 +85,17 @@ struct ddb_regmap {
 	u32 irq_base_idma;
 	u32 irq_base_odma;
 
-	struct ddb_regset *i2c;
-	struct ddb_regset *i2c_buf;
-	struct ddb_regset *idma;
-	struct ddb_regset *idma_buf;
-	struct ddb_regset *odma;
-	struct ddb_regset *odma_buf;
+	const struct ddb_regset *i2c;
+	const struct ddb_regset *i2c_buf;
+	const struct ddb_regset *idma;
+	const struct ddb_regset *idma_buf;
+	const struct ddb_regset *odma;
+	const struct ddb_regset *odma_buf;
 
-	struct ddb_regset *input;
-	struct ddb_regset *output;
+	const struct ddb_regset *input;
+	const struct ddb_regset *output;
 
-	struct ddb_regset *channel;
+	const struct ddb_regset *channel;
 };
 
 struct ddb_ids {
@@ -133,7 +133,7 @@ struct ddb_info {
 #define TS_QUIRK_REVERSED 2
 #define TS_QUIRK_ALT_OSC  8
 	u32   tempmon_irq;
-	struct ddb_regmap *regmap;
+	const struct ddb_regmap *regmap;
 };
 
 /* DMA_SIZE MUST be smaller than 256k and
Signature · 1 line
2.13.0
#6 lore raw

PATCH 6/6 ddbridge: bump version string to 0.9.31intermediate-integrated

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

---
 drivers/media/pci/ddbridge/ddbridge.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ddbridge/ddbridge.h +1 -1
index c1a1edfe15aa..e9afa96bd9df 100644
@@ -63,7 +63,7 @@
 #include "dvb_ca_en50221.h"
 #include "dvb_net.h"
 
-#define DDBRIDGE_VERSION "0.9.29-integrated"
+#define DDBRIDGE_VERSION "0.9.31intermediate-integrated"
 
 #define DDB_MAX_I2C    32
 #define DDB_MAX_PORT   32
Signature · 1 line
2.13.0