diff options
Diffstat (limited to 'drivers/ide/legacy/hd.c')
-rw-r--r-- | drivers/ide/legacy/hd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 45ed03591cd..7f4c0a5050a 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -130,7 +130,7 @@ struct hd_i_struct { #ifdef HD_TYPE static struct hd_i_struct hd_info[] = { HD_TYPE }; -static int NR_HD = ((sizeof (hd_info))/(sizeof (struct hd_i_struct))); +static int NR_HD = ARRAY_SIZE(hd_info); #else static struct hd_i_struct hd_info[MAX_HD]; static int NR_HD; @@ -623,7 +623,8 @@ repeat: cyl = track / disk->head; #ifdef DEBUG printk("%s: %sing: CHS=%d/%d/%d, sectors=%d, buffer=%p\n", - req->rq_disk->disk_name, (req->cmd == READ)?"read":"writ", + req->rq_disk->disk_name, + req_data_dir(req) == READ ? "read" : "writ", cyl, head, sec, nsect, req->buffer); #endif if (blk_fs_request(req)) { |