* [PATCH v1] pnp: Documentation improvements
@ 2026-06-09 14:51 Uwe Kleine-König (The Capable Hub)
2026-06-10 0:36 ` Randy Dunlap
2026-07-17 10:16 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-09 14:51 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Jonathan Corbet, Shuah Khan, linux-doc, linux-kernel
- 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
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
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: a87737435cfa134f9cdcc696ba3080759d04cf72
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] pnp: Documentation improvements
2026-06-09 14:51 [PATCH v1] pnp: Documentation improvements Uwe Kleine-König (The Capable Hub)
@ 2026-06-10 0:36 ` Randy Dunlap
2026-07-17 10:16 ` Uwe Kleine-König (The Capable Hub)
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2026-06-10 0:36 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Rafael J. Wysocki
Cc: Jonathan Corbet, Shuah Khan, linux-doc, linux-kernel
On 6/9/26 7:51 AM, Uwe Kleine-König (The Capable Hub) 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
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
LGTM. Thanks.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
The only issue I have with this file following this patch is
the use of "ex" for "Example" or "E.g.".
> ---
> 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: a87737435cfa134f9cdcc696ba3080759d04cf72
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] pnp: Documentation improvements
2026-06-09 14:51 [PATCH v1] pnp: Documentation improvements Uwe Kleine-König (The Capable Hub)
2026-06-10 0:36 ` Randy Dunlap
@ 2026-07-17 10:16 ` Uwe Kleine-König (The Capable Hub)
2026-07-17 10:19 ` Rafael J. Wysocki (Intel)
1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 10:16 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Jonathan Corbet, Shuah Khan, linux-doc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
Hello,
On Tue, Jun 09, 2026 at 04:51:17PM +0200, Uwe Kleine-König (The Capable Hub) 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
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Who is supposed to pick up this patch? Is this still in someone's queue
that I can expect to get some feedback for it? Silent application would
also be fine to me.
Having said that, the patch still applies fine to next-20260716.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] pnp: Documentation improvements
2026-07-17 10:16 ` Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 10:19 ` Rafael J. Wysocki (Intel)
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki (Intel) @ 2026-07-17 10:19 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: Rafael J. Wysocki, Jonathan Corbet, Shuah Khan, linux-doc, linux-kernel
On Fri, Jul 17, 2026 at 12:16 PM Uwe Kleine-König (The Capable Hub)
<u.kleine-koenig@baylibre.com> wrote:
>
> Hello,
>
> On Tue, Jun 09, 2026 at 04:51:17PM +0200, Uwe Kleine-König (The Capable Hub) 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
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>
> Who is supposed to pick up this patch? Is this still in someone's queue
> that I can expect to get some feedback for it? Silent application would
> also be fine to me.
>
> Having said that, the patch still applies fine to next-20260716.
I'll pick it up, but please send it to linux-acpi@vger.kernel.org for
easier processing.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-17 10:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 14:51 [PATCH v1] pnp: Documentation improvements Uwe Kleine-König (The Capable Hub)
2026-06-10 0:36 ` Randy Dunlap
2026-07-17 10:16 ` Uwe Kleine-König (The Capable Hub)
2026-07-17 10:19 ` Rafael J. Wysocki (Intel)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox