[PATCH v1 1/2] perf: Add Raspberry Pi BCM2835 AXI PMU driver
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Tue Aug 11 07:32:29 PDT 2026
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260811/92b63ac8/attachment.sig>
More information about the linux-arm-kernel
mailing list