Skip to content

Commit

Permalink
pvpanic: Keep single style across modules
Browse files Browse the repository at this point in the history
We have different style on where we place module_*() and MODULE_*() macros.
Inherit the style from the original module (now pvpanic-mmio.c).

Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210829124354.81653-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
andy-shev authored and gregkh committed Sep 14, 2021
1 parent a34993a commit 33a4304
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 6 additions & 8 deletions drivers/misc/pvpanic/pvpanic-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ MODULE_AUTHOR("Mihai Carabas <mihai.carabas@oracle.com>");
MODULE_DESCRIPTION("pvpanic device driver ");
MODULE_LICENSE("GPL");

static const struct pci_device_id pvpanic_pci_id_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_PVPANIC)},
{}
};

static ssize_t capability_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -99,6 +94,12 @@ static int pvpanic_pci_probe(struct pci_dev *pdev,
return devm_pvpanic_probe(&pdev->dev, pi);
}

static const struct pci_device_id pvpanic_pci_id_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_PVPANIC)},
{}
};
MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);

static struct pci_driver pvpanic_pci_driver = {
.name = "pvpanic-pci",
.id_table = pvpanic_pci_id_tbl,
Expand All @@ -107,7 +108,4 @@ static struct pci_driver pvpanic_pci_driver = {
.dev_groups = pvpanic_pci_dev_groups,
},
};

MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);

module_pci_driver(pvpanic_pci_driver);
3 changes: 1 addition & 2 deletions drivers/misc/pvpanic/pvpanic.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,12 @@ static int pvpanic_init(void)

return 0;
}
module_init(pvpanic_init);

static void pvpanic_exit(void)
{
atomic_notifier_chain_unregister(&panic_notifier_list,
&pvpanic_panic_nb);

}

module_init(pvpanic_init);
module_exit(pvpanic_exit);

0 comments on commit 33a4304

Please sign in to comment.