lkml.org 
[lkml]   [2008]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/10] ide-atapi: add a DEV_IS_IDECD macro
Date
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@gmail.com>
> ---
> 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?


\
 
 \ /
  Last update: 2008-09-15 20:37    [W:0.198 / U:62.864 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site