Re: [PATCH 06/10] ide-atapi: add a DEV_IS_IDECD macro
From: Bartlomiej Zolnierkiewicz
Date: Mon Sep 15 2008 - 14:33:39 EST
On Sunday 14 September 2008 13:35:54 Borislav Petkov wrote:
> This is a short-term-use one and will be removed later - it is added to solely
> improve readability.
>
> There should be no functional change resulting from this patch.
>
> Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>
> ---
> drivers/ide/ide-atapi.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 7045d34..e1fa52d 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -477,6 +477,9 @@ static int ide_delayed_transfer_pc(ide_drive_t *drive)
> return WAIT_FLOPPY_CMD;
> }
>
> +#define DEV_IS_IDECD(drive) \
> + (drive->media == ide_cdrom || drive->media == ide_optical)
> +
This needs to check for drive->scsi or the subtle bugs will happen.
Also why not use dev_is_idecd() static inline function instead?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/