diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:14 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:29 +1000 |
commit | a8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6 (patch) | |
tree | 7db67236539b5945ee61c9cdcc5202098761806d /drivers/gpu/drm/nouveau/nvkm/subdev/i2c | |
parent | 95cf469cc3b266324cd9129f93a2d44b85ea27ed (diff) | |
download | talos-op-linux-a8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6.tar.gz talos-op-linux-a8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6.zip |
drm/nouveau/vga: require nvkm_device pointer in accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c index 230727847c68..e76c555d4d0e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv04.c @@ -34,39 +34,39 @@ struct nv04_i2c_port { static void nv04_i2c_drive_scl(struct nvkm_i2c_port *base, int state) { - struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); + struct nvkm_device *device = nvkm_i2c(base)->subdev.device; struct nv04_i2c_port *port = (void *)base; - u8 val = nv_rdvgac(i2c, 0, port->drive); + u8 val = nvkm_rdvgac(device, 0, port->drive); if (state) val |= 0x20; else val &= 0xdf; - nv_wrvgac(i2c, 0, port->drive, val | 0x01); + nvkm_wrvgac(device, 0, port->drive, val | 0x01); } static void nv04_i2c_drive_sda(struct nvkm_i2c_port *base, int state) { - struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); + struct nvkm_device *device = nvkm_i2c(base)->subdev.device; struct nv04_i2c_port *port = (void *)base; - u8 val = nv_rdvgac(i2c, 0, port->drive); + u8 val = nvkm_rdvgac(device, 0, port->drive); if (state) val |= 0x10; else val &= 0xef; - nv_wrvgac(i2c, 0, port->drive, val | 0x01); + nvkm_wrvgac(device, 0, port->drive, val | 0x01); } static int nv04_i2c_sense_scl(struct nvkm_i2c_port *base) { - struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); + struct nvkm_device *device = nvkm_i2c(base)->subdev.device; struct nv04_i2c_port *port = (void *)base; - return !!(nv_rdvgac(i2c, 0, port->sense) & 0x04); + return !!(nvkm_rdvgac(device, 0, port->sense) & 0x04); } static int nv04_i2c_sense_sda(struct nvkm_i2c_port *base) { - struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); + struct nvkm_device *device = nvkm_i2c(base)->subdev.device; struct nv04_i2c_port *port = (void *)base; - return !!(nv_rdvgac(i2c, 0, port->sense) & 0x08); + return !!(nvkm_rdvgac(device, 0, port->sense) & 0x08); } static const struct nvkm_i2c_func |