Re: [PATCH v1 RESEND] pnp: Documentation improvements

From: Rafael J. Wysocki (Intel)

Date: Wed Dec 02 2026 - 14:19:19 EST


On Mon, Nov 23, 2026 at 1:09 PM Uwe Kleine-König (The Capable Hub)
<u.kleine-koenig@xxxxxxxxxxxx> wrote:
>
> - Consistently use named initializers and simplify sentinel
> - Skip assignment to .driver_data if all are 0
> - Use consistent spacing to match Linux coding style
> - Fix prototype of probe function
> - s/pnp_id/pnp_device_id/
> - Drop non-existing .card_id_table
>
> Reviewed-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
> ---
> Hello,
>
> this patch was already send before[1], Rafael replied "I'll pick it up,
> but please send it to linux-acpi@xxxxxxxxxxxxxxx for easier processing."
> which I failed to do until now.
>
> This is a clean rebase to next-20261120, the file didn't change in 2026
> yet, so it's essentially the same patch.

But have you looked at Sashiko's feedback?

https://sashiko.dev/#/patchset/20261123120920.2569882-2-u.kleine-koenig%40baylibre.com

> [1] https://lore.kernel.org/20260609145117.1355753-2-u.kleine-koenig@xxxxxxxxxxxx
>
> Documentation/admin-guide/pnp.rst | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/admin-guide/pnp.rst b/Documentation/admin-guide/pnp.rst
> index 24d80e3eb309..14a0bf400d2d 100644
> --- a/Documentation/admin-guide/pnp.rst
> +++ b/Documentation/admin-guide/pnp.rst
> @@ -203,12 +203,12 @@ The New Way
>
> ex::
>
> - static const struct pnp_id pnp_dev_table[] = {
> + static const struct pnp_device_id pnp_dev_table[] = {
> /* Standard LPT Printer Port */
> - {.id = "PNP0400", .driver_data = 0},
> + { .id = "PNP0400" },
> /* ECP Printer Port */
> - {.id = "PNP0401", .driver_data = 0},
> - {.id = ""}
> + { .id = "PNP0401" },
> + { }
> };
>
> Please note that the character 'X' can be used as a wild card in the function
> @@ -217,14 +217,14 @@ The New Way
> ex::
>
> /* Unknown PnP modems */
> - { "PNPCXXX", UNKNOWN_DEV },
> + { .id = "PNPCXXX", .driver_data = UNKNOWN_DEV },
>
> Supported PnP card IDs can optionally be defined.
> ex::
>
> - static const struct pnp_id pnp_card_table[] = {
> - { "ANYDEVS", 0 },
> - { "", 0 }
> + static const struct pnp_device_id pnp_card_table[] = {
> + { .id = "ANYDEVS" },
> + { }
> };
>
> 2. Optionally define probe and remove functions. It may make sense not to
> @@ -234,14 +234,13 @@ The New Way
> ex::
>
> static int
> - serial_pnp_probe(struct pnp_dev * dev, const struct pnp_id *card_id, const
> - struct pnp_id *dev_id)
> + serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
> {
> . . .
>
> ex::
>
> - static void serial_pnp_remove(struct pnp_dev * dev)
> + static void serial_pnp_remove(struct pnp_dev *dev)
> {
> . . .
>
> @@ -253,7 +252,6 @@ The New Way
>
> static struct pnp_driver serial_pnp_driver = {
> .name = "serial",
> - .card_id_table = pnp_card_table,
> .id_table = pnp_dev_table,
> .probe = serial_pnp_probe,
> .remove = serial_pnp_remove,
>
> base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
> --
> 2.56.0.rc1
>
>