* [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number
@ 2011-11-27 21:26 ` Witold Szczeponik
0 siblings, 0 replies; 2+ messages in thread
From: Witold Szczeponik @ 2011-11-27 21:26 UTC (permalink / raw)
To: linux-acpi; +Cc: linux-kernel
The attached patch uses the constant PNP_ID_LEN instead of using a
literal number for the length of a PNP ID in the scope of PNP quirks.
As a consequence, all IDs used in PNP quirks (c.f. "drivers/pnp/quirks.c")
are now zero-terminated and standard functions that depend on the IDs
to be zero-terminated now work reliably (c.f. "strlen" in "drivers/pnp/driver.c",
function "compare_pnp_id").
The patch is applied against 3.1.
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Index: linux/include/linux/pnp.h
===================================================================
--- linux.orig/include/linux/pnp.h
+++ linux/include/linux/pnp.h
@@ -295,7 +295,7 @@ static inline void pnp_set_drvdata(struc
}
struct pnp_fixup {
- char id[7];
+ char id[PNP_ID_LEN];
void (*quirk_function) (struct pnp_dev * dev); /* fixup function */
};
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number
@ 2011-11-27 21:26 ` Witold Szczeponik
0 siblings, 0 replies; 2+ messages in thread
From: Witold Szczeponik @ 2011-11-27 21:26 UTC (permalink / raw)
To: linux-acpi; +Cc: linux-kernel
The attached patch uses the constant PNP_ID_LEN instead of using a
literal number for the length of a PNP ID in the scope of PNP quirks.
As a consequence, all IDs used in PNP quirks (c.f. "drivers/pnp/quirks.c")
are now zero-terminated and standard functions that depend on the IDs
to be zero-terminated now work reliably (c.f. "strlen" in "drivers/pnp/driver.c",
function "compare_pnp_id").
The patch is applied against 3.1.
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Index: linux/include/linux/pnp.h
===================================================================
--- linux.orig/include/linux/pnp.h
+++ linux/include/linux/pnp.h
@@ -295,7 +295,7 @@ static inline void pnp_set_drvdata(struc
}
struct pnp_fixup {
- char id[7];
+ char id[PNP_ID_LEN];
void (*quirk_function) (struct pnp_dev * dev); /* fixup function */
};
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-27 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 21:26 [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number Witold Szczeponik
2011-11-27 21:26 ` Witold Szczeponik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.