Commit 340ccedb authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] netup_unidvb_ci: Fix dereference of noderef expression

Fix those sparse warnings:
	drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:150:40: warning: dereference of noderef expression
	drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:165:31: warning: dereference of noderef expression
	drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:174:36: warning: dereference of noderef expression
	drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:189:27: warning: dereference of noderef expression
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d91b1d91
...@@ -147,7 +147,7 @@ static int netup_unidvb_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221, ...@@ -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_ci_state *state = en50221->data;
struct netup_unidvb_dev *dev = state->dev; struct netup_unidvb_dev *dev = state->dev;
u8 val = state->membase8_config[addr]; u8 val = *((u8 __force *)state->membase8_io + addr);
dev_dbg(&dev->pci_dev->dev, dev_dbg(&dev->pci_dev->dev,
"%s(): addr=0x%x val=0x%x\n", __func__, addr, val); "%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, ...@@ -162,7 +162,7 @@ static int netup_unidvb_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
dev_dbg(&dev->pci_dev->dev, dev_dbg(&dev->pci_dev->dev,
"%s(): addr=0x%x data=0x%x\n", __func__, addr, data); "%s(): addr=0x%x data=0x%x\n", __func__, addr, data);
state->membase8_config[addr] = data; *((u8 __force *)state->membase8_io + addr) = data;
return 0; return 0;
} }
...@@ -171,7 +171,7 @@ static int netup_unidvb_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221, ...@@ -171,7 +171,7 @@ static int netup_unidvb_ci_read_cam_ctl(struct dvb_ca_en50221 *en50221,
{ {
struct netup_ci_state *state = en50221->data; struct netup_ci_state *state = en50221->data;
struct netup_unidvb_dev *dev = state->dev; struct netup_unidvb_dev *dev = state->dev;
u8 val = state->membase8_io[addr]; u8 val = *((u8 __force *)state->membase8_io + addr);
dev_dbg(&dev->pci_dev->dev, dev_dbg(&dev->pci_dev->dev,
"%s(): addr=0x%x val=0x%x\n", __func__, addr, val); "%s(): addr=0x%x val=0x%x\n", __func__, addr, val);
...@@ -186,7 +186,7 @@ static int netup_unidvb_ci_write_cam_ctl(struct dvb_ca_en50221 *en50221, ...@@ -186,7 +186,7 @@ static int netup_unidvb_ci_write_cam_ctl(struct dvb_ca_en50221 *en50221,
dev_dbg(&dev->pci_dev->dev, dev_dbg(&dev->pci_dev->dev,
"%s(): addr=0x%x data=0x%x\n", __func__, addr, data); "%s(): addr=0x%x data=0x%x\n", __func__, addr, data);
state->membase8_io[addr] = data; *((u8 __force *)state->membase8_io + addr) = data;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment