[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D469B92.6050705@ru.mvista.com>
Date: Mon, 31 Jan 2011 14:22:58 +0300
From: Sergei Shtylyov <sshtylyov@...sta.com>
To: Simon Arlott <simon@...e.lp0.eu>
CC: axboe@...nel.dk, Tejun Heo <tj@...nel.org>, jeff@...zik.org,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, kay.sievers@...y.org, jack@...e.cz,
James.Bottomley@...senPartnership.com
Subject: Re: [PATCH] cdrom: support devices that have check_events but not
media_changed
Hello.
On 30-01-2011 4:31, Simon Arlott wrote:
> 93aae17af1172c40c6f74b7294e93a90c3cfaa5d replaced the media_changed op
Please specify the commit summary in parens, as asked by Linus.
> with the check_events op in drivers/scsi/sr.c
> All users that check for the CDC_MEDIA_CHANGED capability try both
> the check_events op and the media_changed op, but register_cdrom()
> was requiring media_changed.
> This patch fixes the capability checking and removes a redundant
> check that media_changed != NULL.
> The cdrom_select_disc ioctl is also using the two operations, so
> they should be required for CDC_SELECT_DISC too.
> Signed-off-by: Simon Arlott<simon@...e.lp0.eu>
> Cc: Jens Axboe<axboe@...nel.dk>
> Cc: Tejun Heo<tj@...nel.org>
> Cc: Kay Sievers<kay.sievers@...y.org>
[...]
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index 14033a3..4716d76 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -409,7 +409,9 @@ int register_cdrom(struct cdrom_device_info *cdi)
> }
>
> ENSURE(drive_status, CDC_DRIVE_STATUS );
> - ENSURE(media_changed, CDC_MEDIA_CHANGED);
> + if (cdo->check_events == NULL && cdo->media_changed == NULL) {
> + *change_capability = ~(CDC_MEDIA_CHANGED | CDC_SELECT_DISC);
> + }
{} are not needed here. I think checkstatus.pl should detect this...
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists