summaryrefslogtreecommitdiff
path: root/drivers/nfc/pn544/i2c.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-01-09 23:24:18 +0300
committerJakub Kicinski <kuba@kernel.org>2022-01-12 08:09:03 +0300
commite110978d6e060a3e633e3e5e427770a66b330d48 (patch)
tree132803f60313dd49d3e0aa4025d69addc58ce899 /drivers/nfc/pn544/i2c.c
parentcb963a19d99fc42d9abf4238968ef85fcc2ef3e3 (diff)
downloadlinux-e110978d6e060a3e633e3e5e427770a66b330d48.tar.xz
nfc: pn544: make array rset_cmd static const
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>
Diffstat (limited to 'drivers/nfc/pn544/i2c.c')
-rw-r--r--drivers/nfc/pn544/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 37d26f01986b..62a0f1a010cb 100644
--- 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");