diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-05-12 15:22:42 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-11 16:09:14 +1000 |
commit | 7356859a2958645771e041f6c21f8b9d126a6b91 (patch) | |
tree | 28cf56d4f49b2006c5568b708865cf4dbacc43c0 /drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c | |
parent | d93174ec390ebc7c245ec8d09ec6409904334904 (diff) | |
download | talos-op-linux-7356859a2958645771e041f6c21f8b9d126a6b91.tar.gz talos-op-linux-7356859a2958645771e041f6c21f8b9d126a6b91.zip |
drm/nouveau/gpio: split g92 class from nv50
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c index 19529d0ca76b..59ad54a7651b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c @@ -138,7 +138,7 @@ nv50_gpio_intr_disable(struct nouveau_event *event, int line) nv_mask(event->priv, addr + 0x00, mask, 0x00000000); } -static int +int nv50_gpio_ctor(struct nouveau_object *parent, struct nouveau_object *engine, struct nouveau_oclass *oclass, void *data, u32 size, struct nouveau_object **pobject) @@ -146,9 +146,7 @@ nv50_gpio_ctor(struct nouveau_object *parent, struct nouveau_object *engine, struct nv50_gpio_priv *priv; int ret; - ret = nouveau_gpio_create(parent, engine, oclass, - nv_device(parent)->chipset > 0x92 ? 32 : 16, - &priv); + ret = nouveau_gpio_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -202,12 +200,13 @@ nv50_gpio_fini(struct nouveau_object *object, bool suspend) } struct nouveau_oclass * -nv50_gpio_oclass = &(struct nouveau_oclass) { - .handle = NV_SUBDEV(GPIO, 0x50), - .ofuncs = &(struct nouveau_ofuncs) { +nv50_gpio_oclass = &(struct nouveau_gpio_impl) { + .base.handle = NV_SUBDEV(GPIO, 0x50), + .base.ofuncs = &(struct nouveau_ofuncs) { .ctor = nv50_gpio_ctor, .dtor = nv50_gpio_dtor, .init = nv50_gpio_init, .fini = nv50_gpio_fini, }, -}; + .lines = 16. +}.base; |