mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
misc: hpilo: rename device creation loop variable
In `ilo_probe()`, the loop variable `minor` isn't really the minor device number, it's the channel or slot number. Rename it to `slot` for consistency. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20240119132032.106053-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1c9a697bc9
commit
9d5043d93d
1 changed files with 4 additions and 4 deletions
|
@ -770,7 +770,7 @@ static void ilo_remove(struct pci_dev *pdev)
|
||||||
static int ilo_probe(struct pci_dev *pdev,
|
static int ilo_probe(struct pci_dev *pdev,
|
||||||
const struct pci_device_id *ent)
|
const struct pci_device_id *ent)
|
||||||
{
|
{
|
||||||
int devnum, minor, start, error = 0;
|
int devnum, slot, start, error = 0;
|
||||||
struct ilo_hwinfo *ilo_hw;
|
struct ilo_hwinfo *ilo_hw;
|
||||||
|
|
||||||
if (pci_match_id(ilo_blacklist, pdev)) {
|
if (pci_match_id(ilo_blacklist, pdev)) {
|
||||||
|
@ -839,11 +839,11 @@ static int ilo_probe(struct pci_dev *pdev,
|
||||||
goto remove_isr;
|
goto remove_isr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (minor = 0 ; minor < max_ccb; minor++) {
|
for (slot = 0; slot < max_ccb; slot++) {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
dev = device_create(&ilo_class, &pdev->dev,
|
dev = device_create(&ilo_class, &pdev->dev,
|
||||||
MKDEV(ilo_major, start + minor), NULL,
|
MKDEV(ilo_major, start + slot), NULL,
|
||||||
"hpilo!d%dccb%d", devnum, minor);
|
"hpilo!d%dccb%d", devnum, slot);
|
||||||
if (IS_ERR(dev))
|
if (IS_ERR(dev))
|
||||||
dev_err(&pdev->dev, "Could not create files\n");
|
dev_err(&pdev->dev, "Could not create files\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue