summaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-03-06 08:20:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-12 09:09:09 +0300
commit6504b9bdf6f330dc66667e8b2e0a91a2ffa84e33 (patch)
treee34dd910f5b2d7d4b81dc10407699fb223aa15d1 /drivers/staging/sm750fb
parentfcf59a7c611999f8b9b5fe1c08fe4d6c45b93e6b (diff)
downloadlinux-6504b9bdf6f330dc66667e8b2e0a91a2ffa84e33.tar.xz
staging: sm750fb: convert pr_err() to dev_err()
Replace pr_err() calls with respective dev_err() counterpart. Change is safe since pdev is not NULL, this was identified by hand. Semantic patch used to detect and apply the transformation: @r exists@ identifier f,s,i; position p; @@ f(...,struct s *i,...) { <+... pr_err@p(...) ...+> } @s@ identifier r.s, dev; @@ struct s { ... struct device dev; ... }; @t@ identifier r.i, s.dev; expression fmt; position r.p; @@ - pr_err@p( + dev_err(&i->dev, fmt, ...); Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r--drivers/staging/sm750fb/sm750.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index aac74a7495f6..6ed004e40855 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -418,13 +418,16 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
ret = pci_save_state(pdev);
if (ret) {
- pr_err("error:%d occurred in pci_save_state\n", ret);
+ dev_err(&pdev->dev,
+ "error:%d occurred in pci_save_state\n", ret);
return ret;
}
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
if (ret) {
- pr_err("error:%d occurred in pci_set_power_state\n", ret);
+ dev_err(&pdev->dev,
+ "error:%d occurred in pci_set_power_state\n",
+ ret);
return ret;
}
}
@@ -452,7 +455,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
ret = pci_set_power_state(pdev, PCI_D0);
if (ret) {
- pr_err("error:%d occurred in pci_set_power_state\n", ret);
+ dev_err(&pdev->dev,
+ "error:%d occurred in pci_set_power_state\n", ret);
return ret;
}
@@ -460,7 +464,9 @@ static int lynxfb_resume(struct pci_dev *pdev)
pci_restore_state(pdev);
ret = pci_enable_device(pdev);
if (ret) {
- pr_err("error:%d occurred in pci_enable_device\n", ret);
+ dev_err(&pdev->dev,
+ "error:%d occurred in pci_enable_device\n",
+ ret);
return ret;
}
pci_set_master(pdev);