projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb963a1
)
nfc: pn544: make array rset_cmd static const
author
Colin Ian King
<colin.i.king@gmail.com>
Sun, 9 Jan 2022 20:24:18 +0000
(20:24 +0000)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 12 Jan 2022 05:09:03 +0000
(21:09 -0800)
Don't populate the read-only array rset_cmd on the stack but
instead it static const. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link:
https://lore.kernel.org/r/20220109202418.50641-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/pn544/i2c.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/pn544/i2c.c
b/drivers/nfc/pn544/i2c.c
index 37d26f01986b4099d9133f47c5e514659ac60260..62a0f1a010cbfe6a0d18efc1969d0d32afec42e6 100644
(file)
--- a/
drivers/nfc/pn544/i2c.c
+++ b/
drivers/nfc/pn544/i2c.c
@@
-188,7
+188,7
@@
do { \
static void pn544_hci_i2c_platform_init(struct pn544_i2c_phy *phy)
{
int polarity, retry, ret;
- char rset_cmd[] = { 0x05, 0xF9, 0x04, 0x00, 0xC3, 0xE5 };
+
static const
char rset_cmd[] = { 0x05, 0xF9, 0x04, 0x00, 0xC3, 0xE5 };
int count = sizeof(rset_cmd);
nfc_info(&phy->i2c_dev->dev, "Detecting nfc_en polarity\n");