drm/mgag200: Embed connector instance in struct mga_device
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 7 May 2020 09:03:15 +0000 (11:03 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 11 May 2020 14:40:44 +0000 (16:40 +0200)
commit81a15b9a65565dc819c909512c9d83620b33e7ec
tree9c14ee0667036af43d3fd6adf145ba9ef4c5b51c
parent30b0c940f94137d1b61f59498ea97c66cf956cd2
drm/mgag200: Embed connector instance in struct mga_device

Storing the connector instance in struct mga_device avoids some
dynamic memory allocation. On errors, the connector's initializer
function now destroys the i2c structure. Done in preparation of
converting mgag200 to simple-KMS helpers.

v2:
* improved commit message (Michael)
* fixed error message for mgag200_vga_connector_init() (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: John Donnelly <John.p.donnelly@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200507090315.21274-7-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_mode.c