]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.c
Merge tag 'v3.16-rc1' into i2c/for-next
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / core / subdev / i2c / nv50.c
index a8d67a287704df9272af233e5fc755780fca8670..7b8756d4df083b0e3e0e8ede4f3582ffd7537501 100644 (file)
@@ -121,29 +121,15 @@ nv50_i2c_sclass[] = {
        {}
 };
 
-static int
-nv50_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv50_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv50_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv50_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x50),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv50_i2c_ctor,
+struct nouveau_oclass *
+nv50_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x50),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv50_i2c_sclass,
+       .pad_x = &nv04_i2c_pad_oclass,
+}.base;