drm/nouveau/i2c: start hiding subdev-internal interfaces
[deliverable/linux.git] / drivers / gpu / drm / nouveau / core / subdev / i2c / nv04.c
index 860d5d2365dac4e6c76a7dcf7c6301b416bfba22..a37528d5cc9410357c9f4dc5d00e3aa8c2214c66 100644 (file)
  * Authors: Ben Skeggs
  */
 
-#include <subdev/i2c.h>
 #include <subdev/vga.h>
 
+#include "priv.h"
+
 struct nv04_i2c_priv {
        struct nouveau_i2c base;
 };
@@ -115,29 +116,14 @@ nv04_i2c_sclass[] = {
        {}
 };
 
-static int
-nv04_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
-             struct nouveau_oclass *oclass, void *data, u32 size,
-             struct nouveau_object **pobject)
-{
-       struct nv04_i2c_priv *priv;
-       int ret;
-
-       ret = nouveau_i2c_create(parent, engine, oclass, nv04_i2c_sclass, &priv);
-       *pobject = nv_object(priv);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
-struct nouveau_oclass
-nv04_i2c_oclass = {
-       .handle = NV_SUBDEV(I2C, 0x04),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .ctor = nv04_i2c_ctor,
+struct nouveau_oclass *
+nv04_i2c_oclass = &(struct nouveau_i2c_impl) {
+       .base.handle = NV_SUBDEV(I2C, 0x04),
+       .base.ofuncs = &(struct nouveau_ofuncs) {
+               .ctor = _nouveau_i2c_ctor,
                .dtor = _nouveau_i2c_dtor,
                .init = _nouveau_i2c_init,
                .fini = _nouveau_i2c_fini,
        },
-};
+       .sclass = nv04_i2c_sclass,
+}.base;
This page took 0.024505 seconds and 5 git commands to generate.