summaryrefslogtreecommitdiffstats
path: root/drivers/nfc/pn533/pn533.h
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-10-07 00:47:38 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-07 14:35:10 +0200
commitbc642817b6d9e058e058a0bba4bb35df19eb2911 (patch)
treea90b53d6d52d07a3f0eba78ff370007e5c472b75 /drivers/nfc/pn533/pn533.h
parentnfc: pn533: Constify serdev_device_ops (diff)
downloadlinux-bc642817b6d9e058e058a0bba4bb35df19eb2911.tar.xz
linux-bc642817b6d9e058e058a0bba4bb35df19eb2911.zip
nfc: pn533: Constify pn533_phy_ops
Neither the driver or the core modifies the pn533_phy_ops struct, so make them const to allow the compiler to put the static structs in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/pn533/pn533.h')
-rw-r--r--drivers/nfc/pn533/pn533.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/pn533/pn533.h b/drivers/nfc/pn533/pn533.h
index 5f94f38a2a08..09e35b8693f5 100644
--- a/drivers/nfc/pn533/pn533.h
+++ b/drivers/nfc/pn533/pn533.h
@@ -177,7 +177,7 @@ struct pn533 {
struct device *dev;
void *phy;
- struct pn533_phy_ops *phy_ops;
+ const struct pn533_phy_ops *phy_ops;
};
typedef int (*pn533_send_async_complete_t) (struct pn533 *dev, void *arg,
@@ -232,7 +232,7 @@ struct pn533_phy_ops {
struct pn533 *pn53x_common_init(u32 device_type,
enum pn533_protocol_type protocol_type,
void *phy,
- struct pn533_phy_ops *phy_ops,
+ const struct pn533_phy_ops *phy_ops,
struct pn533_frame_ops *fops,
struct device *dev);