[media] Fix CAM module memory read/write
authorAbylay Ospan <aospan@netup.ru>
Fri, 1 Apr 2016 21:00:53 +0000 (18:00 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 7 Jun 2016 15:10:58 +0000 (12:10 -0300)
mistakenly membase8_io used instead of membase8_config
in this case we can't read/write CAM module memory (TUPLES)

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/netup_unidvb/netup_unidvb_ci.c

index f46ffac66ee9573eff4d9ec9a5c83bb03044ec60..f535270c21164bb1aa3faef2da320a74b14718ba 100644 (file)
@@ -147,7 +147,7 @@ static int netup_unidvb_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
 {
        struct netup_ci_state *state = en50221->data;
        struct netup_unidvb_dev *dev = state->dev;
-       u8 val = *((u8 __force *)state->membase8_io + addr);
+       u8 val = *((u8 __force *)state->membase8_config + addr);
 
        dev_dbg(&dev->pci_dev->dev,
                "%s(): addr=0x%x val=0x%x\n", __func__, addr, val);
@@ -162,7 +162,7 @@ static int netup_unidvb_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
 
        dev_dbg(&dev->pci_dev->dev,
                "%s(): addr=0x%x data=0x%x\n", __func__, addr, data);
-       *((u8 __force *)state->membase8_io + addr) = data;
+       *((u8 __force *)state->membase8_config + addr) = data;
        return 0;
 }