Commit d4a994f6 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Wolfram Sang

i2c: i801: Use driver name constant instead of function dev_driver_string

We are the driver, so we can use the driver name directly instead of
retrieving it by calling dev_driver_string().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Tested-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 8d83973e
...@@ -88,6 +88,8 @@ ...@@ -88,6 +88,8 @@
* See the file Documentation/i2c/busses/i2c-i801.rst for details. * See the file Documentation/i2c/busses/i2c-i801.rst for details.
*/ */
#define DRV_NAME "i801_smbus"
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -1805,8 +1807,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1805,8 +1807,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (i801_acpi_probe(priv)) if (i801_acpi_probe(priv))
return -ENODEV; return -ENODEV;
err = pcim_iomap_regions(dev, 1 << SMBBAR, err = pcim_iomap_regions(dev, 1 << SMBBAR, DRV_NAME);
dev_driver_string(&dev->dev));
if (err) { if (err) {
dev_err(&dev->dev, dev_err(&dev->dev,
"Failed to request SMBus region 0x%lx-0x%Lx\n", "Failed to request SMBus region 0x%lx-0x%Lx\n",
...@@ -1864,8 +1865,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1864,8 +1865,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
init_completion(&priv->done); init_completion(&priv->done);
err = devm_request_irq(&dev->dev, dev->irq, i801_isr, err = devm_request_irq(&dev->dev, dev->irq, i801_isr,
IRQF_SHARED, IRQF_SHARED, DRV_NAME, priv);
dev_driver_string(&dev->dev), priv);
if (err) { if (err) {
dev_err(&dev->dev, "Failed to allocate irq %d: %d\n", dev_err(&dev->dev, "Failed to allocate irq %d: %d\n",
dev->irq, err); dev->irq, err);
...@@ -1955,7 +1955,7 @@ static int i801_resume(struct device *dev) ...@@ -1955,7 +1955,7 @@ static int i801_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume); static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
static struct pci_driver i801_driver = { static struct pci_driver i801_driver = {
.name = "i801_smbus", .name = DRV_NAME,
.id_table = i801_ids, .id_table = i801_ids,
.probe = i801_probe, .probe = i801_probe,
.remove = i801_remove, .remove = i801_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment