summaryrefslogtreecommitdiff
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-18 20:30:51 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-18 20:44:33 -0200
commitf2709c206d8a3e11729e68d80c57e7470bbe8e5e (patch)
treea852afe0e9af5b463c16ad671ec6e9151d1e41ab /drivers/media/tuners
parenta4afb3ed430af793702c32ff2e68613263291e81 (diff)
Revert "[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations"
While this patch sounded a good idea, unfortunately, it causes bad dependencies, as drivers that would otherwise work without the DVB core will now break: ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tea5767.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tea5761.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tda827x.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tda18218.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/qt1010.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt2266.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt20xx.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt2060.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mc44s803.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0013.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0012.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0011.ko] undefined! So, we have to revert it. Note: as the argument for the release ops changed from "int" to "void", we needed to change it at the revert patch, to avoid compilation issues like: drivers/media/tuners/tea5767.c:437:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .release = tea5767_release, ^~~~~~~~~~~~~~~ This reverts commit 22a613e89825ea7a3984a968463cc6d425bd8856. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/fc0011.c8
-rw-r--r--drivers/media/tuners/fc0012.c8
-rw-r--r--drivers/media/tuners/fc0013.c8
-rw-r--r--drivers/media/tuners/mc44s803.c10
-rw-r--r--drivers/media/tuners/mt2060.c8
-rw-r--r--drivers/media/tuners/mt20xx.c10
-rw-r--r--drivers/media/tuners/mt2266.c8
-rw-r--r--drivers/media/tuners/qt1010.c8
-rw-r--r--drivers/media/tuners/tda18218.c8
-rw-r--r--drivers/media/tuners/tda827x.c10
-rw-r--r--drivers/media/tuners/tea5761.c8
-rw-r--r--drivers/media/tuners/tea5767.c8
12 files changed, 88 insertions, 14 deletions
diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 5e9e2e694f98..00489a9df4e4 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -112,6 +112,12 @@ static int fc0011_readreg(struct fc0011_priv *priv, u8 reg, u8 *val)
return 0;
}
+static void fc0011_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int fc0011_init(struct dvb_frontend *fe)
{
struct fc0011_priv *priv = fe->tuner_priv;
@@ -475,7 +481,7 @@ static const struct dvb_tuner_ops fc0011_tuner_ops = {
.frequency_max = 1000000000,
},
- .release = dvb_tuner_simple_release,
+ .release = fc0011_release,
.init = fc0011_init,
.set_params = fc0011_set_params,
diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c
index 7faff84e5ea8..30508f44e5f9 100644
--- a/drivers/media/tuners/fc0012.c
+++ b/drivers/media/tuners/fc0012.c
@@ -55,6 +55,12 @@ static int fc0012_readreg(struct fc0012_priv *priv, u8 reg, u8 *val)
return 0;
}
+static void fc0012_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int fc0012_init(struct dvb_frontend *fe)
{
struct fc0012_priv *priv = fe->tuner_priv;
@@ -420,7 +426,7 @@ static const struct dvb_tuner_ops fc0012_tuner_ops = {
.frequency_step = 0,
},
- .release = dvb_tuner_simple_release,
+ .release = fc0012_release,
.init = fc0012_init,
diff --git a/drivers/media/tuners/fc0013.c b/drivers/media/tuners/fc0013.c
index b068b9702cf7..f7cf0e9e7c99 100644
--- a/drivers/media/tuners/fc0013.c
+++ b/drivers/media/tuners/fc0013.c
@@ -52,6 +52,12 @@ static int fc0013_readreg(struct fc0013_priv *priv, u8 reg, u8 *val)
return 0;
}
+static void fc0013_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int fc0013_init(struct dvb_frontend *fe)
{
struct fc0013_priv *priv = fe->tuner_priv;
@@ -579,7 +585,7 @@ static const struct dvb_tuner_ops fc0013_tuner_ops = {
.frequency_step = 0,
},
- .release = dvb_tuner_simple_release,
+ .release = fc0013_release,
.init = fc0013_init,
.sleep = fc0013_sleep,
diff --git a/drivers/media/tuners/mc44s803.c b/drivers/media/tuners/mc44s803.c
index 86542cbd73fb..aba580b4ac2c 100644
--- a/drivers/media/tuners/mc44s803.c
+++ b/drivers/media/tuners/mc44s803.c
@@ -80,6 +80,14 @@ static int mc44s803_readreg(struct mc44s803_priv *priv, u8 reg, u32 *val)
return 0;
}
+static void mc44s803_release(struct dvb_frontend *fe)
+{
+ struct mc44s803_priv *priv = fe->tuner_priv;
+
+ fe->tuner_priv = NULL;
+ kfree(priv);
+}
+
static int mc44s803_init(struct dvb_frontend *fe)
{
struct mc44s803_priv *priv = fe->tuner_priv;
@@ -302,7 +310,7 @@ static const struct dvb_tuner_ops mc44s803_tuner_ops = {
.frequency_step = 100000,
},
- .release = dvb_tuner_simple_release,
+ .release = mc44s803_release,
.init = mc44s803_init,
.set_params = mc44s803_set_params,
.get_frequency = mc44s803_get_frequency,
diff --git a/drivers/media/tuners/mt2060.c b/drivers/media/tuners/mt2060.c
index 14e7b64360cb..94077ea78dde 100644
--- a/drivers/media/tuners/mt2060.c
+++ b/drivers/media/tuners/mt2060.c
@@ -332,6 +332,12 @@ static int mt2060_sleep(struct dvb_frontend *fe)
return ret;
}
+static void mt2060_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static const struct dvb_tuner_ops mt2060_tuner_ops = {
.info = {
.name = "Microtune MT2060",
@@ -340,7 +346,7 @@ static const struct dvb_tuner_ops mt2060_tuner_ops = {
.frequency_step = 50000,
},
- .release = dvb_tuner_simple_release,
+ .release = mt2060_release,
.init = mt2060_init,
.sleep = mt2060_sleep,
diff --git a/drivers/media/tuners/mt20xx.c b/drivers/media/tuners/mt20xx.c
index 4237d8f15919..129bf8e1aff8 100644
--- a/drivers/media/tuners/mt20xx.c
+++ b/drivers/media/tuners/mt20xx.c
@@ -49,6 +49,12 @@ struct microtune_priv {
u32 frequency;
};
+static void microtune_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int microtune_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct microtune_priv *priv = fe->tuner_priv;
@@ -357,7 +363,7 @@ static int mt2032_set_params(struct dvb_frontend *fe,
static const struct dvb_tuner_ops mt2032_tuner_ops = {
.set_analog_params = mt2032_set_params,
- .release = dvb_tuner_simple_release,
+ .release = microtune_release,
.get_frequency = microtune_get_frequency,
};
@@ -552,7 +558,7 @@ static int mt2050_set_params(struct dvb_frontend *fe,
static const struct dvb_tuner_ops mt2050_tuner_ops = {
.set_analog_params = mt2050_set_params,
- .release = dvb_tuner_simple_release,
+ .release = microtune_release,
.get_frequency = microtune_get_frequency,
};
diff --git a/drivers/media/tuners/mt2266.c b/drivers/media/tuners/mt2266.c
index 35ea5e7975ac..88edcc031e3c 100644
--- a/drivers/media/tuners/mt2266.c
+++ b/drivers/media/tuners/mt2266.c
@@ -296,6 +296,12 @@ static int mt2266_sleep(struct dvb_frontend *fe)
return 0;
}
+static void mt2266_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static const struct dvb_tuner_ops mt2266_tuner_ops = {
.info = {
.name = "Microtune MT2266",
@@ -303,7 +309,7 @@ static const struct dvb_tuner_ops mt2266_tuner_ops = {
.frequency_max = 862000000,
.frequency_step = 50000,
},
- .release = dvb_tuner_simple_release,
+ .release = mt2266_release,
.init = mt2266_init,
.sleep = mt2266_sleep,
.set_params = mt2266_set_params,
diff --git a/drivers/media/tuners/qt1010.c b/drivers/media/tuners/qt1010.c
index 5a1662aeeb87..a2c6cd1c3923 100644
--- a/drivers/media/tuners/qt1010.c
+++ b/drivers/media/tuners/qt1010.c
@@ -377,6 +377,12 @@ static int qt1010_init(struct dvb_frontend *fe)
return qt1010_set_params(fe);
}
+static void qt1010_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int qt1010_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct qt1010_priv *priv = fe->tuner_priv;
@@ -398,7 +404,7 @@ static const struct dvb_tuner_ops qt1010_tuner_ops = {
.frequency_step = QT1010_STEP,
},
- .release = dvb_tuner_simple_release,
+ .release = qt1010_release,
.init = qt1010_init,
/* TODO: implement sleep */
diff --git a/drivers/media/tuners/tda18218.c b/drivers/media/tuners/tda18218.c
index 4d2916fb9953..8357a3c08a70 100644
--- a/drivers/media/tuners/tda18218.c
+++ b/drivers/media/tuners/tda18218.c
@@ -265,6 +265,12 @@ static int tda18218_init(struct dvb_frontend *fe)
return ret;
}
+static void tda18218_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static const struct dvb_tuner_ops tda18218_tuner_ops = {
.info = {
.name = "NXP TDA18218",
@@ -274,7 +280,7 @@ static const struct dvb_tuner_ops tda18218_tuner_ops = {
.frequency_step = 1000,
},
- .release = dvb_tuner_simple_release,
+ .release = tda18218_release,
.init = tda18218_init,
.sleep = tda18218_sleep,
diff --git a/drivers/media/tuners/tda827x.c b/drivers/media/tuners/tda827x.c
index 4befb81f0c1a..2137eadf30f1 100644
--- a/drivers/media/tuners/tda827x.c
+++ b/drivers/media/tuners/tda827x.c
@@ -767,6 +767,12 @@ static void tda827xa_agcf(struct dvb_frontend *fe)
/* ------------------------------------------------------------------ */
+static void tda827x_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int tda827x_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct tda827x_priv *priv = fe->tuner_priv;
@@ -818,7 +824,7 @@ static const struct dvb_tuner_ops tda827xo_tuner_ops = {
.frequency_max = 860000000,
.frequency_step = 250000
},
- .release = dvb_tuner_simple_release,
+ .release = tda827x_release,
.init = tda827x_initial_init,
.sleep = tda827x_initial_sleep,
.set_params = tda827xo_set_params,
@@ -834,7 +840,7 @@ static const struct dvb_tuner_ops tda827xa_tuner_ops = {
.frequency_max = 906000000,
.frequency_step = 62500
},
- .release = dvb_tuner_simple_release,
+ .release = tda827x_release,
.init = tda827x_init,
.sleep = tda827xa_sleep,
.set_params = tda827xa_set_params,
diff --git a/drivers/media/tuners/tea5761.c b/drivers/media/tuners/tea5761.c
index 82f25621d995..a9b1bb134409 100644
--- a/drivers/media/tuners/tea5761.c
+++ b/drivers/media/tuners/tea5761.c
@@ -284,6 +284,12 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
return 0;
}
+static void tea5761_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int tea5761_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct tea5761_priv *priv = fe->tuner_priv;
@@ -297,7 +303,7 @@ static const struct dvb_tuner_ops tea5761_tuner_ops = {
},
.set_analog_params = set_radio_freq,
.sleep = set_radio_sleep,
- .release = dvb_tuner_simple_release,
+ .release = tea5761_release,
.get_frequency = tea5761_get_frequency,
.get_status = tea5761_get_status,
.get_rf_strength = tea5761_get_rf_strength,
diff --git a/drivers/media/tuners/tea5767.c b/drivers/media/tuners/tea5767.c
index a33c97de8b8a..525b7ab90c80 100644
--- a/drivers/media/tuners/tea5767.c
+++ b/drivers/media/tuners/tea5767.c
@@ -401,6 +401,12 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
return 0;
}
+static void tea5767_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+}
+
static int tea5767_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct tea5767_priv *priv = fe->tuner_priv;
@@ -426,7 +432,7 @@ static const struct dvb_tuner_ops tea5767_tuner_ops = {
.set_analog_params = set_radio_freq,
.set_config = tea5767_set_config,
.sleep = tea5767_standby,
- .release = dvb_tuner_simple_release,
+ .release = tea5767_release,
.get_frequency = tea5767_get_frequency,
.get_status = tea5767_get_status,
.get_rf_strength = tea5767_get_rf_strength,