diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-05-16 15:43:40 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-05-17 20:23:48 +0200 |
commit | b279df242972ae816a75cf1cc732af836f999100 (patch) | |
tree | a12afd8574bc5fd78d2970abf378e14b2e89893b /drivers/gpu/drm/mgag200/mgag200_drv.h | |
parent | 16f1456466c269ecda32b88c3f8fdd76f8ec370c (diff) | |
download | linux-b279df242972ae816a75cf1cc732af836f999100.tar.bz2 |
drm/mgag200: Switch I2C code to managed cleanup
Store the I2C state within struct mga_device and switch I2C to
managed release. Simplifies the related code and lets us remove
mga_connector_destroy().
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-5-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_drv.h')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_drv.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index a18384c41fc4..5bdd09432114 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -179,7 +179,6 @@ struct mga_i2c_chan { struct mga_connector { struct drm_connector base; - struct mga_i2c_chan *i2c; }; struct mga_mc { @@ -239,6 +238,7 @@ struct mga_device { struct mga_connector connector; struct mgag200_pll pixpll; + struct mga_i2c_chan i2c; struct drm_simple_display_pipe display_pipe; }; @@ -251,8 +251,7 @@ static inline struct mga_device *to_mga_device(struct drm_device *dev) int mgag200_modeset_init(struct mga_device *mdev); /* mgag200_i2c.c */ -struct mga_i2c_chan *mgag200_i2c_create(struct drm_device *dev); -void mgag200_i2c_destroy(struct mga_i2c_chan *i2c); +int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c); /* mgag200_mm.c */ int mgag200_mm_init(struct mga_device *mdev); |