diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 16:39:54 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 22:07:39 +0200 |
commit | 96eefad2d9e5a0d988cdfee85193b6154c0ae1d2 (patch) | |
tree | e222b5850aef9e3dd77c69aabca0e36db752478e /drivers/scsi/sr.h | |
parent | scsi_scan: Fixup scsilun_to_int() (diff) | |
download | linux-96eefad2d9e5a0d988cdfee85193b6154c0ae1d2.tar.xz linux-96eefad2d9e5a0d988cdfee85193b6154c0ae1d2.zip |
scsi: Implement sr_printk()
Update the sr driver to use dev_printk() variants instead of
plain printk(); this will prefix logging messages with the
appropriate device.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/sr.h')
-rw-r--r-- | drivers/scsi/sr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/sr.h b/drivers/scsi/sr.h index 37c8f6b17510..5334e988480d 100644 --- a/drivers/scsi/sr.h +++ b/drivers/scsi/sr.h @@ -55,6 +55,10 @@ typedef struct scsi_cd { struct gendisk *disk; } Scsi_CD; +#define sr_printk(prefix, cd, fmt, a...) \ + sdev_printk(prefix, (cd)->device, "[%s] " fmt, \ + (cd)->cdi.name, ##a) + int sr_do_ioctl(Scsi_CD *, struct packet_command *); int sr_lock_door(struct cdrom_device_info *, int); |