Re: [PATCH v1 1/2] perf: Add Raspberry Pi BCM2835 AXI PMU driver
From: Uwe Kleine-König
Date: Tue Aug 11 2026 - 10:53:00 EST
Hello,
On Tue, Aug 11, 2026 at 01:38:26AM -0700, Ian Rogers wrote:
> +#include <linux/mod_devicetable.h>
> [...]
> +#include <linux/platform_device.h>
Please rely on <linux/platform_device.h> to provide the definition of
of_device_id and drop <linux/mod_devicetable.h>. The latter will go away
soon.
> +/* Devices matching this driver in Device Tree */
> +static const struct of_device_id rpi_axi_pmu_match[] = {
> + {
> + .compatible = "brcm,bcm2835-axiperf",
> + .data = (void *)CHIP_BCM2835,
> + },
> + {
> + .compatible = "brcm,bcm2711-axiperf",
> + .data = (void *)CHIP_BCM2835,
> + },
> + {},
Please use
{ }
as list terminator (that is, add a space and drop the comma).
Also if the data is the same for all variants, maybe better drop the
assigment to .data and hardcode the value accordingly.
> +};
> +
> +MODULE_DEVICE_TABLE(of, rpi_axi_pmu_match);
Usually there is no empty line between the device_id struct and the
MODULE_DEVICE_TABLE macro.
Attachment:
signature.asc
Description: PGP signature