Skip to content

Commit

Permalink
misc/pvpanic-pci: register attributes via pci_driver
Browse files Browse the repository at this point in the history
In __pci_register_driver(), the pci core overwrites the dev_groups field of
the embedded struct device_driver with the dev_groups from the outer
struct pci_driver unconditionally.

Set dev_groups in the pci_driver to make sure it is used.

This was broken since the introduction of pvpanic-pci.

Fixes: db3a4f0 ("misc/pvpanic: add PCI driver")
Cc: [email protected]
Signed-off-by: Thomas Weißschuh <[email protected]>
Fixes: ded13b9 ("PCI: Add support for dev_groups to struct pci_driver")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
t-8ch authored and gregkh committed Apr 29, 2024
1 parent 4108a30 commit ee59be3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/misc/pvpanic/pvpanic-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ static struct pci_driver pvpanic_pci_driver = {
.name = "pvpanic-pci",
.id_table = pvpanic_pci_id_tbl,
.probe = pvpanic_pci_probe,
.driver = {
.dev_groups = pvpanic_dev_groups,
},
.dev_groups = pvpanic_dev_groups,
};
module_pci_driver(pvpanic_pci_driver);

0 comments on commit ee59be3

Please sign in to comment.