diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2021-05-25 22:04:23 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-06-20 22:55:24 +0200 |
commit | d4a994f69f0bed0ba49db12d7bae2c891dc4b51f (patch) | |
tree | 31f71c192541a50ce71537da82e5ff346cc93348 /drivers/i2c | |
parent | 8d83973e7a85b2fab168894ea327dfd4e6ef596e (diff) | |
download | linux-d4a994f69f0bed0ba49db12d7bae2c891dc4b51f.tar.gz linux-d4a994f69f0bed0ba49db12d7bae2c891dc4b51f.tar.bz2 linux-d4a994f69f0bed0ba49db12d7bae2c891dc4b51f.zip |
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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 9b40ea74e325..6f056ef62151 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -88,6 +88,8 @@ * See the file Documentation/i2c/busses/i2c-i801.rst for details. */ +#define DRV_NAME "i801_smbus" + #include <linux/interrupt.h> #include <linux/module.h> #include <linux/pci.h> @@ -1805,8 +1807,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) if (i801_acpi_probe(priv)) return -ENODEV; - err = pcim_iomap_regions(dev, 1 << SMBBAR, - dev_driver_string(&dev->dev)); + err = pcim_iomap_regions(dev, 1 << SMBBAR, DRV_NAME); if (err) { dev_err(&dev->dev, "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) init_completion(&priv->done); err = devm_request_irq(&dev->dev, dev->irq, i801_isr, - IRQF_SHARED, - dev_driver_string(&dev->dev), priv); + IRQF_SHARED, DRV_NAME, priv); if (err) { dev_err(&dev->dev, "Failed to allocate irq %d: %d\n", dev->irq, err); @@ -1955,7 +1955,7 @@ static int i801_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume); static struct pci_driver i801_driver = { - .name = "i801_smbus", + .name = DRV_NAME, .id_table = i801_ids, .probe = i801_probe, .remove = i801_remove, |