[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#577264: Mantis driver patchset split up in individual patches



I'm attaching an alternate patchset consisting of a number of cherry
picked commits from (Linus') upstream.  Most of these applied without
changes on top of 2.6.32.14 as most of them only touch new files under
drivers/media/dvb/ .  This adds a lot of meta data, such as pointers to
upstream commits, which I guess is useful.  But do note that the
resulting driver is still the same.

This patchset replaces the first patch attached to this bug!  Please
apply either one, but not both :-)

A few of the commits had to be edited to avoid touching files not
related to the mantis driver, or to resolve conflicts in the upper level
Kconfig/Makefile.  This has been noted in the commit message.

I have deliberately ignored a few patches which touched the ir input
system, as this has been changed in 2.6.33 and newer.

As before, the only existing file touched is tda10021.c (except for the
necessary Kconfig and Makefile changes).  This is a simple bugfix to
allow tda10021 and tda10023 to be probed in that order.  The upstream
commit 4af699c13a5fb7332255de5fa56442d065f547a3 is applied unmodified.

I hope this set will make it easier for you to review and add this
driver to the Debian 2.6.32 kernel.  Thanks.


The list of cherry picked commits are

8873c61f1fe849bc8719839ddfa3300266f8bc39 edited 
4af699c13a5fb7332255de5fa56442d065f547a3
000f64efc7fe6693261a78a0164c0e805553631b
7ccf1eea972177064b4df9d5ba68958604781db6 edited
2c1fee024d86b718b3198f664747c9028776c751
fcd89de3bd1c8735f9b7c759dc4848ab6e525bb9
4cf0b3f130a4fe573077e4d0237fd3dd0f67d3f6
184ac7535ee078a4572b668a348134d67c3977d2
8825a0970cef408fb2f1a44e3cb05d6ba41a18db
4cd191fba45ee3cf3035d7e4d3a942979cd9c5e4
28fddb7cd5b7a12b81c8ec1a358749e60760e741
f5ae4f6f482191c531ea9e50ac91d9bd2ffca171
1e42dc78900e9d0ce89d77f3ba6aca00abd5f1b5
a1497357dce240880d984f4b657b54245f739dbc
c5e598a6f89ca7335db9f327e24e3abd13d137cf
0ac6e141eb105f5845eb7066b5279709393b1c78
83dbe82bd7766e5045e6561bd44e22b801e7ad76
0bdc799b8b82cf61c86604291c53998febc96403
5dd83a35bea908ebb8243d67d8c251eed2bb5cc8
281859179f731b28aae78d13b2e8720219492000
68fe255cd15cf1fe04877fbbb0eafe80c43eff5d
bc832fa2c0310c25ed60204616ccef4f8db088f3
3e978a8284080d801d20cda377d9cf7c12fe68b9 edited
ad0ac434cb3b34640a4e81d7e80a1512c6e40253
b3b961448f702339444036f94252ff2ba7a99feb
add206368462434ba97e8fe4de98e5d47ffdb0a0
ec1b6ff1cce9d406a9a5f84a1d1205328f2c515a
42f541bfd1a9bad84a288d59a98fdb284df61a45
99b55b2c4478e6370aaa85173f5090a070c50a08
f684336bba673b6656cb98144130ab52dafc3240
616f75e1979f5bd1f3241581c720349c2c31f6e7
263645de70175d8b5a5e392a1856e99e2e1b7209
13d5036ea0636e6204e1b17bd12ea25061a686be
ff63ac56705539e162d2f020a0c2a607eae37d7b
f5701b67767c6b81a035c9e2b539025f91d1e84d
e26c2b46201e5ae38111391c293cec08870b7f6d
b29f6ac248e49d8425aa91afb1b53d1f6d47ebe3
c63e507346c042af7fe26d49bbbdce9898ea3eea
25e9eba42ce11a05933068cf6a42dd8d4ed5edb8
4d019faf48ff03b6ff3463d8e5da54d61f153623
e0e099a708043a2341d8987014ce4ba98a4dbd30
ac8f04d2723b3de7c36430d67401ce89c858e117
b9fd5877463605b91743552b4989666792bf4fbc
c02e15150c85619f22a98675124503ed93bf1914
c90d345fd7d66899d743611a47163f9904df90bc
578413228ae72a09b29bf29e879e5b919ded0ac4
17b77fc2d404910ca691661038ceb4c02d912d16
f668c7292bda7f64400eaa8d45c3a785eecab990
9e49e8d913209e7221f761193f18a91d130b9e2d
adcc9dd57e814d5ac3928f92f431fbe4808e936f
18b6de42d77e7762be929a4a858c359de352e1e2
b29453aca0eeecba52a76c3d67b1a52c3ca6e656
8b9c385f765bcc7fc5ae802830ffcb4b6ca6bc9c
5e2a0c99019bbc78d6fb00caf7a79f03df020b3c
8e0d58ecee2abc12f298862b7f9a90d1593e8006
88a6fa9dfec0a585409acbb49a7f86a933b35d2b
cc0e4aacaf4c3660fa759ce1299377baaf9efd8b
86c75c5c2b9318f4b3218615ada18badabd3f166
9c8679554db8cf39ccec5a90cfaa12b164585556
2ec9b00bd0386b71c8a84a3990a13ea9656fe8dd
bb928a7a21273f67455912f0935ff943ddb35d0c
05691cdbf479282e3d3c2e3386cb865cbf611e3a
f9ce1c3f32aa472c667c4d43d01c42922fb356ca
990f8d1e161429ee1a0e9708f7989543e4648f73
fb6de9c5fe13fd5cd866c49204e6bd91d73f83b0
b619f9f8a111be3f6ec8ec2671eb93c66a673b90
b2d8f5eafd31cd7bc722dc93057d8c5fd5b688ab
4d5a28efda3ce12529e4b90832184f62c7a50848
ac23f4c86c3c901f95d72fc2262b22e6230d4feb
ea30d81a9634cb4c13bbef46877f0d7730c57552
a0c59063a7fe92524ab8fa6e31997b177a8f3029
fbe1e43abc6ada6bcd3e9866b01e41f093f12c62
2133ffbf08e7fca0614ea73cb5c43cc6435b4414
4e9fbeeedc22d287b5d05e32bbc647cd2dc8c663
6053240f5cc914d40ac9c7afe15008bf3e46359c
c9a750c909cbde15ecd0f8545f48e051bfee6271
d8b14f8a76d71c84622a211f57baf15f61cc9703
12855cac87218d0c92ffdebb7270cec040cf5a6a
3062b1571a1d3520c4d3160ebbfca8002b1d6963
d9dd5f7168d6a61491996fc02e4deb9d96308178
50d82602760c99d2c954c33360990c00146532cd
8ce571f5e7eb7186f676af3b60af7980c2fc7929
fadfa070d30434dd228362c933827eb6ce137f2d
d575571e8eda92c2cfd727ef050d17e30878fee6
bc4ed42fdf762a2049b255de92626ad1cfd86d8e
dd827da1e7d6ecf81883af68731cf0f1c2393c6d
d4f4ae046d2a9cd6b7ddb39e336a73ed92b63fe8
cb428c3fe9667eb7521769f25f65b9dbf52a33ca
23fc1b2b00e849f6ec8628da77e2f282aedbebf3
9ce39460837202920fb9bad88eeec13fc75e7a13
1159531a93f04346d94f72fdb4719c3f7e7d0a8c
35afca912ffb8ea5a060ff53a59266ccaa769c98
0131258ba7a5f776627da953b4cef775568026ea
873c8c25ebca50bd60e21784c4d442c4fecb8658
b2eb1312faa26703e71b7b3945c8773213e9ee49
5e68b0aedaa34447d86ae5cc6d071251c62bef37
99d96e4e9202aa046e3e2be1813ff59c84e67608
51d20db8bb9c5a14ac2320664289f13bd52625c6
2687d832fe0141015e2391f3755d9499e6efb83e
f8e26cdec5ac25ae8d73e278e21033292de5430b
77557abef0de3f1f1e8f563db6df8710a9e930fe
417036844823313901d7f7d7b963f215cc3b0641
8154bad4c488c1a23fb504a6e751d71a39733b76
33c79630dd9fb7658dbb885a22e3a8127b16a38a
1fa1f107852484157c5453cc6c4a60c792f06c35
e2f67e4fb931b975058b3bd48eaac43780c92c88
e4deee04ffda9b44f367a40dbad8306ab88cb321
01a8c3eebb3c83df337f88332756f16154cecc0f
715d341c59d2563940ae07b12f949555ccbe3efb
da7365f46607207c8166167ba497e3cb3e02270d
55172773c57221c7c81e445d04f811f2f0478c3e
df0cca174b4d85ea041509a13e5e68b377758bf1
bd1fcac0148fb4a44395227edb0ff8ee31e09de1
071e3060a5f482e5948608d55e28bc7f5dd759cd
776c3ebe9678f86b9b0e72d541208bb39f9551c6
e15c7ccd31faa0618478ad78e11423891919a87e
b05c90de08b582172b8f63dd751ac0a1aee421e9
a890cce595c86013ca1fba644c25c01b86149b23
41e840b13e111ba18b138d055ddd250bd5ad5e39


The diffstat shows that this patchset
 1) adds a new "mantis" directory under dvb
 2) adds two new frontend drivers, "mb86a16" and "tda665x" under dvb/frontends
 3) makes the necessary changes to the two affected Kconfig's and Makefile's
 4) modifies the "tda10021" driver as described above


 drivers/media/dvb/Kconfig                  |    4 +
 drivers/media/dvb/Makefile                 |   14 +-
 drivers/media/dvb/frontends/Kconfig        |   19 +
 drivers/media/dvb/frontends/Makefile       |    2 +
 drivers/media/dvb/frontends/mb86a16.c      | 1878 ++++++++++++++++++++++++++++
 drivers/media/dvb/frontends/mb86a16.h      |   52 +
 drivers/media/dvb/frontends/mb86a16_priv.h |  151 +++
 drivers/media/dvb/frontends/tda10021.c     |    4 +
 drivers/media/dvb/frontends/tda665x.c      |  257 ++++
 drivers/media/dvb/frontends/tda665x.h      |   52 +
 drivers/media/dvb/mantis/Kconfig           |   32 +
 drivers/media/dvb/mantis/Makefile          |   28 +
 drivers/media/dvb/mantis/hopper_cards.c    |  277 ++++
 drivers/media/dvb/mantis/hopper_vp3028.c   |   88 ++
 drivers/media/dvb/mantis/hopper_vp3028.h   |   30 +
 drivers/media/dvb/mantis/mantis_ca.c       |  207 +++
 drivers/media/dvb/mantis/mantis_ca.h       |   27 +
 drivers/media/dvb/mantis/mantis_cards.c    |  307 +++++
 drivers/media/dvb/mantis/mantis_common.h   |  179 +++
 drivers/media/dvb/mantis/mantis_core.c     |  238 ++++
 drivers/media/dvb/mantis/mantis_core.h     |   57 +
 drivers/media/dvb/mantis/mantis_dma.c      |  256 ++++
 drivers/media/dvb/mantis/mantis_dma.h      |   30 +
 drivers/media/dvb/mantis/mantis_dvb.c      |  296 +++++
 drivers/media/dvb/mantis/mantis_dvb.h      |   35 +
 drivers/media/dvb/mantis/mantis_evm.c      |  117 ++
 drivers/media/dvb/mantis/mantis_hif.c      |  238 ++++
 drivers/media/dvb/mantis/mantis_hif.h      |   29 +
 drivers/media/dvb/mantis/mantis_i2c.c      |  267 ++++
 drivers/media/dvb/mantis/mantis_i2c.h      |   30 +
 drivers/media/dvb/mantis/mantis_input.c    |  148 +++
 drivers/media/dvb/mantis/mantis_ioc.c      |  130 ++
 drivers/media/dvb/mantis/mantis_ioc.h      |   51 +
 drivers/media/dvb/mantis/mantis_link.h     |   83 ++
 drivers/media/dvb/mantis/mantis_pci.c      |  172 +++
 drivers/media/dvb/mantis/mantis_pci.h      |   27 +
 drivers/media/dvb/mantis/mantis_pcmcia.c   |  120 ++
 drivers/media/dvb/mantis/mantis_reg.h      |  197 +++
 drivers/media/dvb/mantis/mantis_uart.c     |  186 +++
 drivers/media/dvb/mantis/mantis_uart.h     |   58 +
 drivers/media/dvb/mantis/mantis_vp1033.c   |  212 ++++
 drivers/media/dvb/mantis/mantis_vp1033.h   |   30 +
 drivers/media/dvb/mantis/mantis_vp1034.c   |  119 ++
 drivers/media/dvb/mantis/mantis_vp1034.h   |   33 +
 drivers/media/dvb/mantis/mantis_vp1041.c   |  358 ++++++
 drivers/media/dvb/mantis/mantis_vp1041.h   |   33 +
 drivers/media/dvb/mantis/mantis_vp2033.c   |  187 +++
 drivers/media/dvb/mantis/mantis_vp2033.h   |   30 +
 drivers/media/dvb/mantis/mantis_vp2040.c   |  186 +++
 drivers/media/dvb/mantis/mantis_vp2040.h   |   32 +
 drivers/media/dvb/mantis/mantis_vp3028.c   |   38 +
 drivers/media/dvb/mantis/mantis_vp3028.h   |   33 +
 drivers/media/dvb/mantis/mantis_vp3030.c   |  105 ++
 drivers/media/dvb/mantis/mantis_vp3030.h   |   30 +
 54 files changed, 7798 insertions(+), 1 deletions(-)


The patchset brings the driver in line with the version in 2.6.35-rc1
except for the following diff, which is explained below:


diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c
index 599d1aa..d05f750 100644
--- a/drivers/media/dvb/frontends/mb86a16.c
+++ b/drivers/media/dvb/frontends/mb86a16.c
@@ -22,7 +22,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/slab.h>
 
 #include "dvb_frontend.h"
 #include "mb86a16.h"
diff --git a/drivers/media/dvb/frontends/tda665x.c b/drivers/media/dvb/frontends/tda665x.c
index 2c1c759..c44fefe 100644
--- a/drivers/media/dvb/frontends/tda665x.c
+++ b/drivers/media/dvb/frontends/tda665x.c
@@ -20,7 +20,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/slab.h>
 
 #include "dvb_frontend.h"
 #include "tda665x.h"
diff --git a/drivers/media/dvb/mantis/hopper_cards.c b/drivers/media/dvb/mantis/hopper_cards.c
index 09e9fc7..1bf03ac 100644
--- a/drivers/media/dvb/mantis/hopper_cards.c
+++ b/drivers/media/dvb/mantis/hopper_cards.c
@@ -22,7 +22,6 @@
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
-#include <linux/slab.h>
 #include <asm/irq.h>
 #include <linux/interrupt.h>
 
@@ -251,6 +250,8 @@ static struct pci_device_id hopper_pci_table[] = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(pci, hopper_pci_table);
+
 static struct pci_driver hopper_pci_driver = {
 	.name		= DRIVER_NAME,
 	.id_table	= hopper_pci_table,
diff --git a/drivers/media/dvb/mantis/mantis_ca.c b/drivers/media/dvb/mantis/mantis_ca.c
index 330216f..403ce04 100644
--- a/drivers/media/dvb/mantis/mantis_ca.c
+++ b/drivers/media/dvb/mantis/mantis_ca.c
@@ -19,7 +19,6 @@
 */
 
 #include <linux/signal.h>
-#include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
diff --git a/drivers/media/dvb/mantis/mantis_cards.c b/drivers/media/dvb/mantis/mantis_cards.c
index cf4b39f..64970cf 100644
--- a/drivers/media/dvb/mantis/mantis_cards.c
+++ b/drivers/media/dvb/mantis/mantis_cards.c
@@ -22,7 +22,6 @@
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
-#include <linux/slab.h>
 #include <asm/irq.h>
 #include <linux/interrupt.h>
 
@@ -281,6 +280,8 @@ static struct pci_device_id mantis_pci_table[] = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(pci, mantis_pci_table);
+
 static struct pci_driver mantis_pci_driver = {
 	.name		= DRIVER_NAME,
 	.id_table	= mantis_pci_table,
diff --git a/drivers/media/dvb/mantis/mantis_input.c b/drivers/media/dvb/mantis/mantis_input.c
index 3d4e466..487d149 100644
--- a/drivers/media/dvb/mantis/mantis_input.c
+++ b/drivers/media/dvb/mantis/mantis_input.c
@@ -32,8 +32,6 @@
 #include "mantis_reg.h"
 #include "mantis_uart.h"
 
-#define MODULE_NAME "mantis_core"
-
 static struct ir_scancode mantis_ir_table[] = {
 	{ 0x29, KEY_POWER	},
 	{ 0x28, KEY_FAVORITES	},
@@ -120,7 +118,7 @@ int mantis_input_init(struct mantis_pci *mantis)
 	rc->name = name;
 	rc->phys = dev;
 
-	ir_input_init(rc, &rc_state, IR_TYPE_OTHER);
+	ir_input_init(rc, &rc_state, IR_TYPE_OTHER, &ir_mantis);
 
 	rc->id.bustype	= BUS_PCI;
 	rc->id.vendor	= mantis->vendor_id;
@@ -128,7 +126,7 @@ int mantis_input_init(struct mantis_pci *mantis)
 	rc->id.version	= 1;
 	rc->dev		= mantis->pdev->dev;
 
-	err = __ir_input_register(rc, &ir_mantis, NULL, MODULE_NAME);
+	err = input_register_device(rc);
 	if (err) {
 		dprintk(MANTIS_ERROR, 1, "IR device registration failed, ret = %d", err);
 		input_free_device(rc);
@@ -144,7 +142,7 @@ int mantis_exit(struct mantis_pci *mantis)
 {
 	struct input_dev *rc = mantis->rc;
 
-	ir_input_unregister(rc);
+	input_unregister_device(rc);
 
 	return 0;
 }



The above diff shows 3 issues:

1) I've ignored the slab.h fix from commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 
   because that commit touches a large number of files (4208).  The
   mantis part could of course have been included, but I see no reason
   as it isn't intended for 2.6.32 anyway

2) a MODULE_DEVICE_TABLE() entry has been added to the two PCI drivers
   to allow them to autoload.  This is a bugfix not yet in upstream,
   taken from http://jusst.de/hg/mantis-v4l-dvb/raw-rev/3731f71ed6bf
   I've chosen to include it because it's obviously correct and it does
   improve the usability a lot.  But I'm of course willing to let it go
   if the deviation from upstream is a problem.  The patch file name is
   0119-Mantis-hopper-use-MODULE_DEVICE_TABLE-use-the-macro-.patch
   and it can safely be dropped if necessary

3) I've dropped a number of patches related to the IR subsystem, as this
   has undergone a lot of changes in 2.6.33..35 and still is changing.
   This diff is necessary to make the driver build in 2.6.32.



I can provide a git repository with the patchset if necessary, but the
bandwidth is so low that I don't think it's useful.  Let me know if you
still want to try.  But you might just as well clone
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.32.y.git
and run "git am" on the attached patches. 




Bjørn


Attachment: mantis-patches.tar.gz
Description: Binary data

Attachment: pgprf7b10IfnY.pgp
Description: PGP signature


Reply to: