Commit d2bcfce7 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/ibus: use nvkm_subdev_new_()

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent f02ca842
...@@ -114,9 +114,5 @@ int ...@@ -114,9 +114,5 @@ int
gf100_ibus_new(struct nvkm_device *device, int index, gf100_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gf100_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gf100_ibus, device, index, ibus);
return 0;
} }
...@@ -43,9 +43,5 @@ int ...@@ -43,9 +43,5 @@ int
gf117_ibus_new(struct nvkm_device *device, int index, gf117_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gf117_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gf117_ibus, device, index, ibus);
return 0;
} }
...@@ -117,9 +117,5 @@ int ...@@ -117,9 +117,5 @@ int
gk104_ibus_new(struct nvkm_device *device, int index, gk104_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gk104_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gk104_ibus, device, index, ibus);
return 0;
} }
...@@ -81,9 +81,5 @@ int ...@@ -81,9 +81,5 @@ int
gk20a_ibus_new(struct nvkm_device *device, int index, gk20a_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gk20a_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gk20a_ibus, device, index, ibus);
return 0;
} }
...@@ -32,9 +32,5 @@ int ...@@ -32,9 +32,5 @@ int
gm200_ibus_new(struct nvkm_device *device, int index, gm200_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gm200_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gm200_ibus, device, index, ibus);
return 0;
} }
...@@ -51,9 +51,5 @@ int ...@@ -51,9 +51,5 @@ int
gp10b_ibus_new(struct nvkm_device *device, int index, gp10b_ibus_new(struct nvkm_device *device, int index,
struct nvkm_subdev **pibus) struct nvkm_subdev **pibus)
{ {
struct nvkm_subdev *ibus; return nvkm_subdev_new_(&gp10b_ibus, device, index, pibus);
if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
return -ENOMEM;
nvkm_subdev_ctor(&gp10b_ibus, device, index, ibus);
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment