Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1320881 > unrolled thread
| Started by | Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
|---|---|
| First post | 2016-01-28 18:10 +0100 |
| Last post | 2016-01-28 21:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 31/31] media: au0828 change to check media device unregister progress state Mauro Carvalho Chehab <mchehab@osg.samsung.com> - 2016-01-28 18:10 +0100
Re: [PATCH 31/31] media: au0828 change to check media device unregister progress state Shuah Khan <shuahkh@osg.samsung.com> - 2016-01-28 21:40 +0100
| From | Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
|---|---|
| Date | 2016-01-28 18:10 +0100 |
| Subject | Re: [PATCH 31/31] media: au0828 change to check media device unregister progress state |
| Message-ID | <qVYf1-6zx-39@gated-at.bofh.it> |
Em Wed, 6 Jan 2016 13:27:20 -0700
Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> Change au0828_unregister_media_device() to check media
> device media device unregister is in progress and avoid
> calling media_device_unregister() and other cleanup done
> in au0828_unregister_media_device().
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> drivers/media/usb/au0828/au0828-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
> index 886fb28..de357a2 100644
> --- a/drivers/media/usb/au0828/au0828-core.c
> +++ b/drivers/media/usb/au0828/au0828-core.c
> @@ -136,7 +136,9 @@ static void au0828_unregister_media_device(struct au0828_dev *dev)
>
> #ifdef CONFIG_MEDIA_CONTROLLER
> if (dev->media_dev &&
> - media_devnode_is_registered(&dev->media_dev->devnode)) {
> + media_devnode_is_registered(&dev->media_dev->devnode) &&
> + !media_device_is_unregister_in_progress(dev->media_dev)) {
> +
A kref would likely work better here.
> media_device_unregister(dev->media_dev);
> media_device_cleanup(dev->media_dev);
> dev->media_dev = NULL;
[toc] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-01-28 21:40 +0100 |
| Message-ID | <qW1wf-ng-21@gated-at.bofh.it> |
| In reply to | #1320881 |
On 01/28/2016 10:05 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 6 Jan 2016 13:27:20 -0700
> Shuah Khan <shuahkh@osg.samsung.com> escreveu:
>
>> Change au0828_unregister_media_device() to check media
>> device media device unregister is in progress and avoid
>> calling media_device_unregister() and other cleanup done
>> in au0828_unregister_media_device().
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>> drivers/media/usb/au0828/au0828-core.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
>> index 886fb28..de357a2 100644
>> --- a/drivers/media/usb/au0828/au0828-core.c
>> +++ b/drivers/media/usb/au0828/au0828-core.c
>> @@ -136,7 +136,9 @@ static void au0828_unregister_media_device(struct au0828_dev *dev)
>>
>> #ifdef CONFIG_MEDIA_CONTROLLER
>> if (dev->media_dev &&
>> - media_devnode_is_registered(&dev->media_dev->devnode)) {
>> + media_devnode_is_registered(&dev->media_dev->devnode) &&
>> + !media_device_is_unregister_in_progress(dev->media_dev)) {
>> +
>
> A kref would likely work better here.
Hope you saw my response to[PATCH 29/31] on why ensuring
two drivers don't get into unregister is necessary.
Could you please elaborate on kref. Are you saying adding
kref to struct media_device?
thanks,
-- Shuah
>
>> media_device_unregister(dev->media_dev);
>> media_device_cleanup(dev->media_dev);
>> dev->media_dev = NULL;
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web