* [PATCH 0/2] media: make drivers use their own namespace
@ 2014-04-18 1:24 Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 1/2] technisat-usb2: rename led enums to be specific to driver Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 2/2] bt8xx: make driver routines fit into its own namespcae Luis R. Rodriguez
0 siblings, 2 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2014-04-18 1:24 UTC (permalink / raw)
To: m.chehab, felipensp, mkrufky, linux-media; +Cc: backports, Luis R. Rodriguez
Couple of changes to help with backports, both to help with ensuring
drivers use their own namespace.
Luis R. Rodriguez (2):
technisat-usb2: rename led enums to be specific to driver
bt8xx: make driver routines fit into its own namespcae
drivers/media/pci/bt8xx/dst.c | 20 ++++++++++----------
drivers/media/usb/dvb-usb/technisat-usb2.c | 28 ++++++++++++++--------------
2 files changed, 24 insertions(+), 24 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] technisat-usb2: rename led enums to be specific to driver
2014-04-18 1:24 [PATCH 0/2] media: make drivers use their own namespace Luis R. Rodriguez
@ 2014-04-18 1:24 ` Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 2/2] bt8xx: make driver routines fit into its own namespcae Luis R. Rodriguez
1 sibling, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2014-04-18 1:24 UTC (permalink / raw)
To: m.chehab, felipensp, mkrufky, linux-media; +Cc: backports, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof@suse.com>
The current names clash with include/linux/leds.h namespace,
although there is no compile issue currently this does affect
backports. Drivers should also try to avoid generic namespaces
for things like this.
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Felipe Pena <felipensp@gmail.com>
Cc: Michael Krufky <mkrufky@linuxtv.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
drivers/media/usb/dvb-usb/technisat-usb2.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c
index 98d24ae..d947e03 100644
--- a/drivers/media/usb/dvb-usb/technisat-usb2.c
+++ b/drivers/media/usb/dvb-usb/technisat-usb2.c
@@ -214,10 +214,10 @@ static void technisat_usb2_frontend_reset(struct usb_device *udev)
/* LED control */
enum technisat_usb2_led_state {
- LED_OFF,
- LED_BLINK,
- LED_ON,
- LED_UNDEFINED
+ TECH_LED_OFF,
+ TECH_LED_BLINK,
+ TECH_LED_ON,
+ TECH_LED_UNDEFINED
};
static int technisat_usb2_set_led(struct dvb_usb_device *d, int red, enum technisat_usb2_led_state state)
@@ -229,14 +229,14 @@ static int technisat_usb2_set_led(struct dvb_usb_device *d, int red, enum techni
0
};
- if (disable_led_control && state != LED_OFF)
+ if (disable_led_control && state != TECH_LED_OFF)
return 0;
switch (state) {
- case LED_ON:
+ case TECH_LED_ON:
led[1] = 0x82;
break;
- case LED_BLINK:
+ case TECH_LED_BLINK:
led[1] = 0x82;
if (red) {
led[2] = 0x02;
@@ -251,7 +251,7 @@ static int technisat_usb2_set_led(struct dvb_usb_device *d, int red, enum techni
break;
default:
- case LED_OFF:
+ case TECH_LED_OFF:
led[1] = 0x80;
break;
}
@@ -310,11 +310,11 @@ static void technisat_usb2_green_led_control(struct work_struct *work)
goto schedule;
if (ber > 1000)
- technisat_usb2_set_led(state->dev, 0, LED_BLINK);
+ technisat_usb2_set_led(state->dev, 0, TECH_LED_BLINK);
else
- technisat_usb2_set_led(state->dev, 0, LED_ON);
+ technisat_usb2_set_led(state->dev, 0, TECH_LED_ON);
} else
- technisat_usb2_set_led(state->dev, 0, LED_OFF);
+ technisat_usb2_set_led(state->dev, 0, TECH_LED_OFF);
}
schedule:
@@ -365,9 +365,9 @@ static int technisat_usb2_power_ctrl(struct dvb_usb_device *d, int level)
return 0;
/* green led is turned off in any case - will be turned on when tuning */
- technisat_usb2_set_led(d, 0, LED_OFF);
+ technisat_usb2_set_led(d, 0, TECH_LED_OFF);
/* red led is turned on all the time */
- technisat_usb2_set_led(d, 1, LED_ON);
+ technisat_usb2_set_led(d, 1, TECH_LED_ON);
return 0;
}
@@ -667,7 +667,7 @@ static int technisat_usb2_rc_query(struct dvb_usb_device *d)
return 0;
if (!disable_led_control)
- technisat_usb2_set_led(d, 1, LED_BLINK);
+ technisat_usb2_set_led(d, 1, TECH_LED_BLINK);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] bt8xx: make driver routines fit into its own namespcae
2014-04-18 1:24 [PATCH 0/2] media: make drivers use their own namespace Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 1/2] technisat-usb2: rename led enums to be specific to driver Luis R. Rodriguez
@ 2014-04-18 1:24 ` Luis R. Rodriguez
1 sibling, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2014-04-18 1:24 UTC (permalink / raw)
To: m.chehab, felipensp, mkrufky, linux-media; +Cc: backports, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof@suse.com>
There is a few conflicts with older symbols on older kernels so we
have to patch this driver when backporting. Instead just make these
routines specific to the driver.
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
drivers/media/pci/bt8xx/dst.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c
index 430b3eb..f2261df 100644
--- a/drivers/media/pci/bt8xx/dst.c
+++ b/drivers/media/pci/bt8xx/dst.c
@@ -1544,7 +1544,7 @@ static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd)
}
-static int dst_init(struct dvb_frontend *fe)
+static int bt8xx_dst_init(struct dvb_frontend *fe)
{
struct dst_state *state = fe->demodulator_priv;
@@ -1707,7 +1707,7 @@ static int dst_get_frontend(struct dvb_frontend *fe)
return 0;
}
-static void dst_release(struct dvb_frontend *fe)
+static void bt8xx_dst_release(struct dvb_frontend *fe)
{
struct dst_state *state = fe->demodulator_priv;
if (state->dst_ca) {
@@ -1776,8 +1776,8 @@ static struct dvb_frontend_ops dst_dvbt_ops = {
FE_CAN_GUARD_INTERVAL_AUTO
},
- .release = dst_release,
- .init = dst_init,
+ .release = bt8xx_dst_release,
+ .init = bt8xx_dst_init,
.tune = dst_tune_frontend,
.set_frontend = dst_set_frontend,
.get_frontend = dst_get_frontend,
@@ -1801,8 +1801,8 @@ static struct dvb_frontend_ops dst_dvbs_ops = {
.caps = FE_CAN_FEC_AUTO | FE_CAN_QPSK
},
- .release = dst_release,
- .init = dst_init,
+ .release = bt8xx_dst_release,
+ .init = bt8xx_dst_init,
.tune = dst_tune_frontend,
.set_frontend = dst_set_frontend,
.get_frontend = dst_get_frontend,
@@ -1834,8 +1834,8 @@ static struct dvb_frontend_ops dst_dvbc_ops = {
FE_CAN_QAM_256
},
- .release = dst_release,
- .init = dst_init,
+ .release = bt8xx_dst_release,
+ .init = bt8xx_dst_init,
.tune = dst_tune_frontend,
.set_frontend = dst_set_frontend,
.get_frontend = dst_get_frontend,
@@ -1857,8 +1857,8 @@ static struct dvb_frontend_ops dst_atsc_ops = {
.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO | FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB
},
- .release = dst_release,
- .init = dst_init,
+ .release = bt8xx_dst_release,
+ .init = bt8xx_dst_init,
.tune = dst_tune_frontend,
.set_frontend = dst_set_frontend,
.get_frontend = dst_get_frontend,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-18 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 1:24 [PATCH 0/2] media: make drivers use their own namespace Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 1/2] technisat-usb2: rename led enums to be specific to driver Luis R. Rodriguez
2014-04-18 1:24 ` [PATCH 2/2] bt8xx: make driver routines fit into its own namespcae Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).