aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-05-08 16:04:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-09 16:53:26 -0400
commit32c826b66cc6f91831b5473a0ddceb410d4ffaf0 (patch)
tree0c7c7d60bca56721504849253ddbcc791472f33c /drivers/misc
parent374212750b06ae2270e0e1e5843cfb33d5faf3f9 (diff)
mei: pci_probe/remove: use dev_err instead of printk(KERN_ERR
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index ef5e3ec40f55..6510c5adac2a 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -951,7 +951,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
951 /* enable pci dev */ 951 /* enable pci dev */
952 err = pci_enable_device(pdev); 952 err = pci_enable_device(pdev);
953 if (err) { 953 if (err) {
954 printk(KERN_ERR "mei: Failed to enable pci device.\n"); 954 dev_err(&pdev->dev, "failed to enable pci device.\n");
955 goto end; 955 goto end;
956 } 956 }
957 /* set PCI host mastering */ 957 /* set PCI host mastering */
@@ -959,7 +959,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
959 /* pci request regions for mei driver */ 959 /* pci request regions for mei driver */
960 err = pci_request_regions(pdev, mei_driver_name); 960 err = pci_request_regions(pdev, mei_driver_name);
961 if (err) { 961 if (err) {
962 printk(KERN_ERR "mei: Failed to get pci regions.\n"); 962 dev_err(&pdev->dev, "failed to get pci regions.\n");
963 goto disable_device; 963 goto disable_device;
964 } 964 }
965 /* allocates and initializes the mei dev structure */ 965 /* allocates and initializes the mei dev structure */
@@ -971,7 +971,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
971 /* mapping IO device memory */ 971 /* mapping IO device memory */
972 dev->mem_addr = pci_iomap(pdev, 0, 0); 972 dev->mem_addr = pci_iomap(pdev, 0, 0);
973 if (!dev->mem_addr) { 973 if (!dev->mem_addr) {
974 printk(KERN_ERR "mei: mapping I/O device memory failure.\n"); 974 dev_err(&pdev->dev, "mapping I/O device memory failure.\n");
975 err = -ENOMEM; 975 err = -ENOMEM;
976 goto free_device; 976 goto free_device;
977 } 977 }
@@ -990,13 +990,13 @@ static int __devinit mei_probe(struct pci_dev *pdev,
990 IRQF_SHARED, mei_driver_name, dev); 990 IRQF_SHARED, mei_driver_name, dev);
991 991
992 if (err) { 992 if (err) {
993 printk(KERN_ERR "mei: request_threaded_irq failure. irq = %d\n", 993 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
994 pdev->irq); 994 pdev->irq);
995 goto unmap_memory; 995 goto unmap_memory;
996 } 996 }
997 INIT_DELAYED_WORK(&dev->timer_work, mei_timer); 997 INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
998 if (mei_hw_init(dev)) { 998 if (mei_hw_init(dev)) {
999 printk(KERN_ERR "mei: Init hw failure.\n"); 999 dev_err(&pdev->dev, "init hw failure.\n");
1000 err = -ENODEV; 1000 err = -ENODEV;
1001 goto release_irq; 1001 goto release_irq;
1002 } 1002 }
@@ -1034,7 +1034,7 @@ disable_device:
1034 pci_disable_device(pdev); 1034 pci_disable_device(pdev);
1035end: 1035end:
1036 mutex_unlock(&mei_mutex); 1036 mutex_unlock(&mei_mutex);
1037 printk(KERN_ERR "mei: Driver initialization failed.\n"); 1037 dev_err(&pdev->dev, "initialization failed.\n");
1038 return err; 1038 return err;
1039} 1039}
1040 1040
@@ -1153,8 +1153,8 @@ static int mei_pci_resume(struct device *device)
1153 IRQF_SHARED, mei_driver_name, dev); 1153 IRQF_SHARED, mei_driver_name, dev);
1154 1154
1155 if (err) { 1155 if (err) {
1156 printk(KERN_ERR "mei: Request_irq failure. irq = %d\n", 1156 dev_err(&pdev->dev, "request_threaded_irq failed: irq = %d.\n",
1157 pdev->irq); 1157 pdev->irq);
1158 return err; 1158 return err;
1159 } 1159 }
1160 1160