mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 17:43:56 +08:00
drm/hx8357d: Use devm_drm_dev_alloc
Already using devm_drm_dev_init, so very simple replacment. Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-21-daniel.vetter@ffwll.ch
This commit is contained in:
parent
4c99859f3b
commit
f3eb15bb79
@ -226,17 +226,12 @@ static int hx8357d_probe(struct spi_device *spi)
|
||||
u32 rotation = 0;
|
||||
int ret;
|
||||
|
||||
dbidev = kzalloc(sizeof(*dbidev), GFP_KERNEL);
|
||||
if (!dbidev)
|
||||
return -ENOMEM;
|
||||
dbidev = devm_drm_dev_alloc(dev, &hx8357d_driver,
|
||||
struct mipi_dbi_dev, drm);
|
||||
if (IS_ERR(dbidev))
|
||||
return PTR_ERR(dbidev);
|
||||
|
||||
drm = &dbidev->drm;
|
||||
ret = devm_drm_dev_init(dev, drm, &hx8357d_driver);
|
||||
if (ret) {
|
||||
kfree(dbidev);
|
||||
return ret;
|
||||
}
|
||||
drmm_add_final_kfree(drm, dbidev);
|
||||
|
||||
dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW);
|
||||
if (IS_ERR(dc)) {
|
||||
|
Loading…
Reference in New Issue
Block a user