Re: [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver
From: Uwe Kleine-König
Date: Mon Nov 30 2026 - 04:33:48 EST
On Mon, Nov 30, 2026 at 01:13:50AM +0100, David Heidelberg wrote:
> +#include <linux/mod_devicetable.h>
> [...]
> +#include <linux/platform_device.h>
<linux/platform_device.h> already provides of_device_id without the
unneeded transitive includes that <linux/mod_devicetable.h> has. So
please drop the latter to reduce build dependencies in your driver (and
to not interfer with my quest to remove <linux/mod_devicetable.h>).
> [...]
> +static void pmi8998_haptics_shutdown(struct platform_device *pdev)
> +{
> + struct pmi8998_haptics *haptics = platform_get_drvdata(pdev);
> +
> + pmi8998_haptics_stop_all(haptics);
> +}
Is this really needed? If yes a comment describing why would be awesome.
> [...]
> +static struct platform_driver pmi8998_haptics_driver = {
> + .probe = pmi8998_haptics_probe,
> + .shutdown = pmi8998_haptics_shutdown,
> + .driver = {
> + .name = "qcom-pmi8998-haptics",
> + .pm = pm_sleep_ptr(&pmi8998_haptics_pm_ops),
> + .of_match_table = pmi8998_haptics_match_table,
I'm not a fan of aligning the = in such initializers, because it tends
so be broken by later patches (or they have to touch more lines than
necessary to reinstate the alignment). Sometimes the alignment is even
broken from the start ...
If you ask me, just use a single space before the =.
> + },
> +};
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature