nfc: s3fwrn5: constify s3fwrn5_phy_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 13 Nov 2015 12:04:41 +0000 (13:04 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 20 Dec 2015 17:32:39 +0000 (18:32 +0100)
The s3fwrn5_phy_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/s3fwrn5/core.c
drivers/nfc/s3fwrn5/i2c.c
drivers/nfc/s3fwrn5/s3fwrn5.h

index 0d866ca295e3f634b0fcc707853a26ba9ed44da5..9d9c8d57a042d45084082e10b30f686d82b7edb4 100644 (file)
@@ -147,7 +147,7 @@ static struct nci_ops s3fwrn5_nci_ops = {
 };
 
 int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev,
-       struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload)
+       const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload)
 {
        struct s3fwrn5_info *info;
        int ret;
index c61d8a308da456f8bbdda345a190e5abf85fbe45..3ed0adf6479b07e092974c29bdba3e4f166432b6 100644 (file)
@@ -125,7 +125,7 @@ static int s3fwrn5_i2c_write(void *phy_id, struct sk_buff *skb)
        return 0;
 }
 
-static struct s3fwrn5_phy_ops i2c_phy_ops = {
+static const struct s3fwrn5_phy_ops i2c_phy_ops = {
        .set_wake = s3fwrn5_i2c_set_wake,
        .set_mode = s3fwrn5_i2c_set_mode,
        .get_mode = s3fwrn5_i2c_get_mode,
index 89210d4828b8733ad491e20048e8cc34b67a224b..7d5e516036fb28b1918df9db70fee66e90617bbc 100644 (file)
@@ -44,7 +44,7 @@ struct s3fwrn5_info {
        void *phy_id;
        struct device *pdev;
 
-       struct s3fwrn5_phy_ops *phy_ops;
+       const struct s3fwrn5_phy_ops *phy_ops;
        unsigned int max_payload;
 
        struct s3fwrn5_fw_info fw_info;
@@ -90,7 +90,7 @@ static inline int s3fwrn5_write(struct s3fwrn5_info *info, struct sk_buff *skb)
 }
 
 int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev,
-       struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload);
+       const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload);
 void s3fwrn5_remove(struct nci_dev *ndev);
 
 int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb,
This page took 0.030514 seconds and 5 git commands to generate.