Skip to content

Commit

Permalink
[media] Revert "[media] media: au0828 change to use Managed Media Con…
Browse files Browse the repository at this point in the history
…troller API"

Extending the lifetime of the media_device struct is not handled well
by the core, as it will erase some data from the struct, when
media_device_cleanup() is called after unregistering it.

While we have a fixup patch for it already, the usage of those new
functions are needed only when we share data with other drivers.

So, better to revert the changes.

This reverts commit 182dde7 ("[media] media: au0828 change
to use Managed Media Controller API")

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
mchehab committed Mar 31, 2016
1 parent c89178f commit 405ddbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/usb/au0828/au0828-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static void au0828_unregister_media_device(struct au0828_dev *dev)

media_device_unregister(dev->media_dev);
media_device_cleanup(dev->media_dev);
kfree(dev->media_dev);
dev->media_dev = NULL;
}
#endif
Expand Down Expand Up @@ -197,7 +198,7 @@ static int au0828_media_device_init(struct au0828_dev *dev,
#ifdef CONFIG_MEDIA_CONTROLLER
struct media_device *mdev;

mdev = media_device_get_devres(&udev->dev);
mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
if (!mdev)
return -ENOMEM;

Expand Down

0 comments on commit 405ddbf

Please sign in to comment.