From 6dfe991113504108b04b1c36d09436e1712942b8 Mon Sep 17 00:00:00 2001 From: Olli Salonen Date: Fri, 11 Mar 2016 03:48:03 -0300 Subject: [PATCH] [media] smipcie: add RC map into card configuration options Remove the if..else statement from smipcie-ir.c and add the remote controller map as a configuration parameter for the card. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/smipcie/smipcie-ir.c | 5 +---- drivers/media/pci/smipcie/smipcie-main.c | 4 ++++ drivers/media/pci/smipcie/smipcie.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/smipcie/smipcie-ir.c b/drivers/media/pci/smipcie/smipcie-ir.c index d737b5e767d0..826c7c75e64d 100644 --- a/drivers/media/pci/smipcie/smipcie-ir.c +++ b/drivers/media/pci/smipcie/smipcie-ir.c @@ -203,10 +203,7 @@ int smi_ir_init(struct smi_dev *dev) rc_dev->dev.parent = &dev->pci_dev->dev; rc_dev->driver_type = RC_DRIVER_SCANCODE; - if (dev->info->type == SMI_TECHNOTREND_S2_4200) - rc_dev->map_name = RC_MAP_TT_1500; - else - rc_dev->map_name = RC_MAP_DVBSKY; + rc_dev->map_name = dev->info->rc_map; ir->rc_dev = rc_dev; ir->dev = dev; diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c index 4a9275a331b6..83981d611a79 100644 --- a/drivers/media/pci/smipcie/smipcie-main.c +++ b/drivers/media/pci/smipcie/smipcie-main.c @@ -1067,6 +1067,7 @@ static struct smi_cfg_info dvbsky_s950_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_NULL, .fe_1 = DVBSKY_FE_M88DS3103, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info dvbsky_s952_cfg = { @@ -1076,6 +1077,7 @@ static struct smi_cfg_info dvbsky_s952_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_M88RS6000, .fe_1 = DVBSKY_FE_M88RS6000, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info dvbsky_t9580_cfg = { @@ -1085,6 +1087,7 @@ static struct smi_cfg_info dvbsky_t9580_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_SIT2, .fe_1 = DVBSKY_FE_M88DS3103, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info technotrend_s2_4200_cfg = { @@ -1094,6 +1097,7 @@ static struct smi_cfg_info technotrend_s2_4200_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_M88RS6000, .fe_1 = DVBSKY_FE_M88RS6000, + .rc_map = RC_MAP_TT_1500, }; /* PCI IDs */ diff --git a/drivers/media/pci/smipcie/smipcie.h b/drivers/media/pci/smipcie/smipcie.h index 5528e483ebc5..611e4f02cadd 100644 --- a/drivers/media/pci/smipcie/smipcie.h +++ b/drivers/media/pci/smipcie/smipcie.h @@ -233,6 +233,7 @@ struct smi_cfg_info { #define DVBSKY_FE_SIT2 3 int fe_0; int fe_1; + char *rc_map; }; struct smi_rc { -- 2.20.1