diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:06 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:08 +1000 |
commit | 5b920d926422fdc5b40b703d72344d5e20b3872a (patch) | |
tree | b264b2563e67218a2b4102b8b87ae27310b09885 /drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c | |
parent | drm/nouveau/gpio: cosmetic changes (diff) | |
download | linux-dev-5b920d926422fdc5b40b703d72344d5e20b3872a.tar.xz linux-dev-5b920d926422fdc5b40b703d72344d5e20b3872a.zip |
drm/nouveau/i2c: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c index 046fe5e2ea19..ba3116f686fa 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/nv4e.c @@ -25,10 +25,6 @@ #include <subdev/vga.h> -struct nv4e_i2c_priv { - struct nvkm_i2c base; -}; - struct nv4e_i2c_port { struct nvkm_i2c_port base; u32 addr; @@ -37,33 +33,33 @@ struct nv4e_i2c_port { static void nv4e_i2c_drive_scl(struct nvkm_i2c_port *base, int state) { - struct nv4e_i2c_priv *priv = (void *)nvkm_i2c(base); + struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); struct nv4e_i2c_port *port = (void *)base; - nv_mask(priv, port->addr, 0x2f, state ? 0x21 : 0x01); + nv_mask(i2c, port->addr, 0x2f, state ? 0x21 : 0x01); } static void nv4e_i2c_drive_sda(struct nvkm_i2c_port *base, int state) { - struct nv4e_i2c_priv *priv = (void *)nvkm_i2c(base); + struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); struct nv4e_i2c_port *port = (void *)base; - nv_mask(priv, port->addr, 0x1f, state ? 0x11 : 0x01); + nv_mask(i2c, port->addr, 0x1f, state ? 0x11 : 0x01); } static int nv4e_i2c_sense_scl(struct nvkm_i2c_port *base) { - struct nv4e_i2c_priv *priv = (void *)nvkm_i2c(base); + struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); struct nv4e_i2c_port *port = (void *)base; - return !!(nv_rd32(priv, port->addr) & 0x00040000); + return !!(nv_rd32(i2c, port->addr) & 0x00040000); } static int nv4e_i2c_sense_sda(struct nvkm_i2c_port *base) { - struct nv4e_i2c_priv *priv = (void *)nvkm_i2c(base); + struct nvkm_i2c *i2c = (void *)nvkm_i2c(base); struct nv4e_i2c_port *port = (void *)base; - return !!(nv_rd32(priv, port->addr) & 0x00080000); + return !!(nv_rd32(i2c, port->addr) & 0x00080000); } static const struct nvkm_i2c_func |