diff options
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 2307278..e76c555 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 |