Skip to content

Commit

Permalink
Build fixing fl2000_drm
Browse files Browse the repository at this point in the history
  • Loading branch information
klogg committed Sep 11, 2024
1 parent a759446 commit 07b840a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fl2000_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static struct component_master_ops fl2000_master_ops = {
*
* @return 0 on success, negative value on error
*/
int fl2000_drm_init(sstruct usb_device *usb_dev)
int fl2000_drm_init(struct usb_device *usb_dev)
{
int ret;
struct fl2000_drm_if *drm_if;
Expand Down Expand Up @@ -627,9 +627,18 @@ int fl2000_drm_init(sstruct usb_device *usb_dev)

void fl2000_drm_cleanup(struct usb_device *usb_dev)
{
struct drm_device *drm;
struct fl2000_drm_if *drm_if = dev_get_drvdata(&usb_dev->dev);

if (!drm_if) {
dev_err(&usb_dev->dev, "Cannot find DRM structure!");
return;
}

dev_set_drvdata(&usb_dev->dev, NULL);
component_master_del(&usb_dev->dev, &fl2000_master_ops);

drm = &drm_if->drm;
drm_mode_config_cleanup(drm);
drm_dev_put(drm);
}

0 comments on commit 07b840a

Please sign in to comment.