[libata] use dev_printk() throughout drivers
A few drivers were not following the standard meme of printing out their driver name and version at module load time; this is fixed as well.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/device.h>
|
||||
#include "scsi.h"
|
||||
#include <scsi/scsi_host.h>
|
||||
#include <linux/libata.h>
|
||||
@@ -237,6 +238,7 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
|
||||
|
||||
static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
static int printed_version;
|
||||
struct ata_probe_ent *probe_ent = NULL;
|
||||
int rc;
|
||||
u32 genctl;
|
||||
@@ -245,6 +247,9 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
u8 pmr;
|
||||
u8 port2_start;
|
||||
|
||||
if (!printed_version++)
|
||||
dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n");
|
||||
|
||||
rc = pci_enable_device(pdev);
|
||||
if (rc)
|
||||
return rc;
|
||||
@@ -288,16 +293,18 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
pci_read_config_byte(pdev, SIS_PMR, &pmr);
|
||||
if (ent->device != 0x182) {
|
||||
if ((pmr & SIS_PMR_COMBINED) == 0) {
|
||||
printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in SATA mode\n");
|
||||
dev_printk(KERN_INFO, &pdev->dev,
|
||||
"Detected SiS 180/181 chipset in SATA mode\n");
|
||||
port2_start = 64;
|
||||
}
|
||||
else {
|
||||
printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in combined mode\n");
|
||||
dev_printk(KERN_INFO, &pdev->dev,
|
||||
"Detected SiS 180/181 chipset in combined mode\n");
|
||||
port2_start=0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
printk(KERN_INFO "sata_sis: Detected SiS 182 chipset\n");
|
||||
dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n");
|
||||
port2_start = 0x20;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user