staging: sm750fb: convert pr_err() to dev_err()
Subsystems (2)
PATCH v2 1/1 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 <[email protected]>
---
Change in v2:
* update commit message stating that pdev is not NULL and that it was identified by hand
drivers/staging/sm750fb/sm750.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.c +10 -4
@@ -418,14 +418,17 @@ 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; }pci_disable_device (pdev); 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; } }
@@ -453,7 +456,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; }
@@ -461,7 +465,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);
Signature · 1 line
1.9.1