From: Borislav Petkov <petkovbb@googlemail.com>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 04/10] ide-tape: use flags query macros
Date: Sun, 15 Feb 2009 13:08:06 +0100 [thread overview]
Message-ID: <1234699692-9452-5-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1234699692-9452-1-git-send-email-petkovbb@gmail.com>
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-tape.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1b97d7a..fb391b9 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -792,11 +792,11 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
*/
stat = hwif->tp_ops->read_status(hwif);
- if ((drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) == 0 &&
+ if (!ide_drv_dsc_overlap(drive) &&
(rq->cmd[13] & REQ_IDETAPE_PC2) == 0)
set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags);
- if (drive->dev_flags & IDE_DFLAG_POST_RESET) {
+ if (ide_drv_post_reset(drive)) {
set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags);
drive->dev_flags &= ~IDE_DFLAG_POST_RESET;
}
@@ -1328,7 +1328,7 @@ static int idetape_init_read(ide_drive_t *drive)
* No point in issuing this if DSC overlap isn't supported, some
* drives (Seagate STT3401A) will return an error.
*/
- if (drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) {
+ if (ide_drv_dsc_overlap(drive)) {
bytes_read = idetape_queue_rw_tail(drive,
REQ_IDETAPE_READ, 0,
tape->merge_bh);
@@ -1604,7 +1604,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
* point in issuing this if DSC overlap isn't supported, some
* drives (Seagate STT3401A) will return an error.
*/
- if (drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) {
+ if (ide_drv_dsc_overlap(drive)) {
ssize_t retval = idetape_queue_rw_tail(drive,
REQ_IDETAPE_WRITE, 0,
tape->merge_bh);
@@ -2216,7 +2216,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
(*(u16 *)&tape->caps[16] * 512) / tape->buffer_size,
tape->buffer_size / 1024,
tape->best_dsc_rw_freq * 1000 / HZ,
- (drive->dev_flags & IDE_DFLAG_USING_DMA) ? ", DMA" : "");
+ ide_drv_using_dma(drive) ? ", DMA" : "");
ide_proc_register_driver(drive, tape->driver);
}
@@ -2357,7 +2357,7 @@ static int ide_tape_probe(ide_drive_t *drive)
if (drive->media != ide_tape)
goto failed;
- if ((drive->dev_flags & IDE_DFLAG_ID_READ) &&
+ if (ide_drv_id_read(drive) &&
ide_check_atapi_device(drive, DRV_NAME) == 0) {
printk(KERN_ERR "ide-tape: %s: not supported by this version of"
" the driver\n", drive->name);
--
1.6.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <petkovbb@googlemail.com>
To: <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 04/10] ide-tape: use flags query macros
Date: Sun, 15 Feb 2009 13:08:06 +0100 [thread overview]
Message-ID: <1234699692-9452-5-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1234699692-9452-1-git-send-email-petkovbb@gmail.com>
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-tape.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1b97d7a..fb391b9 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -792,11 +792,11 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
*/
stat = hwif->tp_ops->read_status(hwif);
- if ((drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) == 0 &&
+ if (!ide_drv_dsc_overlap(drive) &&
(rq->cmd[13] & REQ_IDETAPE_PC2) == 0)
set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags);
- if (drive->dev_flags & IDE_DFLAG_POST_RESET) {
+ if (ide_drv_post_reset(drive)) {
set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags);
drive->dev_flags &= ~IDE_DFLAG_POST_RESET;
}
@@ -1328,7 +1328,7 @@ static int idetape_init_read(ide_drive_t *drive)
* No point in issuing this if DSC overlap isn't supported, some
* drives (Seagate STT3401A) will return an error.
*/
- if (drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) {
+ if (ide_drv_dsc_overlap(drive)) {
bytes_read = idetape_queue_rw_tail(drive,
REQ_IDETAPE_READ, 0,
tape->merge_bh);
@@ -1604,7 +1604,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf,
* point in issuing this if DSC overlap isn't supported, some
* drives (Seagate STT3401A) will return an error.
*/
- if (drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) {
+ if (ide_drv_dsc_overlap(drive)) {
ssize_t retval = idetape_queue_rw_tail(drive,
REQ_IDETAPE_WRITE, 0,
tape->merge_bh);
@@ -2216,7 +2216,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
(*(u16 *)&tape->caps[16] * 512) / tape->buffer_size,
tape->buffer_size / 1024,
tape->best_dsc_rw_freq * 1000 / HZ,
- (drive->dev_flags & IDE_DFLAG_USING_DMA) ? ", DMA" : "");
+ ide_drv_using_dma(drive) ? ", DMA" : "");
ide_proc_register_driver(drive, tape->driver);
}
@@ -2357,7 +2357,7 @@ static int ide_tape_probe(ide_drive_t *drive)
if (drive->media != ide_tape)
goto failed;
- if ((drive->dev_flags & IDE_DFLAG_ID_READ) &&
+ if (ide_drv_id_read(drive) &&
ide_check_atapi_device(drive, DRV_NAME) == 0) {
printk(KERN_ERR "ide-tape: %s: not supported by this version of"
" the driver\n", drive->name);
--
1.6.0.4
next prev parent reply other threads:[~2009-02-15 12:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 12:08 [PATCH 0/10] ide: flags query macros Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 01/10] ide: add " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 13:35 ` Sam Ravnborg
2009-02-15 18:01 ` Borislav Petkov
2009-02-15 20:51 ` Sam Ravnborg
2009-02-16 21:07 ` Bartlomiej Zolnierkiewicz
2009-02-15 12:08 ` [PATCH 02/10] ide-cd: use " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 03/10] ide-floppy: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov [this message]
2009-02-15 12:08 ` [PATCH 04/10] ide-tape: " Borislav Petkov
2009-02-15 12:08 ` [PATCH 05/10] ide-atapi: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 06/10] ide-disk: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 07/10] ide-devsets: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 08/10] ide-eh: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 09/10] ide-probe: " Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-15 12:08 ` [PATCH 10/10] ide: use flags query macros in the remaining ide code Borislav Petkov
2009-02-15 12:08 ` Borislav Petkov
2009-02-16 22:17 ` [PATCH 0/10] ide: flags query macros Bartlomiej Zolnierkiewicz
2009-02-17 14:33 ` Bartlomiej Zolnierkiewicz
2009-02-23 7:04 ` Borislav Petkov
2009-02-23 7:34 ` Sam Ravnborg
2009-02-23 8:25 ` Borislav Petkov
2009-02-26 21:35 ` Bartlomiej Zolnierkiewicz
2009-02-27 6:38 ` Borislav Petkov
2009-02-27 8:21 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234699692-9452-5-git-send-email-petkovbb@gmail.com \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.