forked from luck/tmp_suning_uos_patched
NFC: nxp-nci: constify nxp_nci_phy_ops structure
The only instance of a nxp_nci_phy_ops structure is never modified. Thus the declaration of the structure and all references to the structure type can be made const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
893a84e818
commit
7cf6d08caf
|
@ -109,7 +109,8 @@ static struct nci_ops nxp_nci_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int nxp_nci_probe(void *phy_id, struct device *pdev,
|
int nxp_nci_probe(void *phy_id, struct device *pdev,
|
||||||
struct nxp_nci_phy_ops *phy_ops, unsigned int max_payload,
|
const struct nxp_nci_phy_ops *phy_ops,
|
||||||
|
unsigned int max_payload,
|
||||||
struct nci_dev **ndev)
|
struct nci_dev **ndev)
|
||||||
{
|
{
|
||||||
struct nxp_nci_info *info;
|
struct nxp_nci_info *info;
|
||||||
|
|
|
@ -106,7 +106,7 @@ static int nxp_nci_i2c_write(void *phy_id, struct sk_buff *skb)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nxp_nci_phy_ops i2c_phy_ops = {
|
static const struct nxp_nci_phy_ops i2c_phy_ops = {
|
||||||
.set_mode = nxp_nci_i2c_set_mode,
|
.set_mode = nxp_nci_i2c_set_mode,
|
||||||
.write = nxp_nci_i2c_write,
|
.write = nxp_nci_i2c_write,
|
||||||
};
|
};
|
||||||
|
|
|
@ -68,7 +68,7 @@ struct nxp_nci_info {
|
||||||
|
|
||||||
enum nxp_nci_mode mode;
|
enum nxp_nci_mode mode;
|
||||||
|
|
||||||
struct nxp_nci_phy_ops *phy_ops;
|
const struct nxp_nci_phy_ops *phy_ops;
|
||||||
unsigned int max_payload;
|
unsigned int max_payload;
|
||||||
|
|
||||||
struct mutex info_lock;
|
struct mutex info_lock;
|
||||||
|
@ -82,7 +82,8 @@ void nxp_nci_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
|
||||||
void nxp_nci_fw_work_complete(struct nxp_nci_info *info, int result);
|
void nxp_nci_fw_work_complete(struct nxp_nci_info *info, int result);
|
||||||
|
|
||||||
int nxp_nci_probe(void *phy_id, struct device *pdev,
|
int nxp_nci_probe(void *phy_id, struct device *pdev,
|
||||||
struct nxp_nci_phy_ops *phy_ops, unsigned int max_payload,
|
const struct nxp_nci_phy_ops *phy_ops,
|
||||||
|
unsigned int max_payload,
|
||||||
struct nci_dev **ndev);
|
struct nci_dev **ndev);
|
||||||
void nxp_nci_remove(struct nci_dev *ndev);
|
void nxp_nci_remove(struct nci_dev *ndev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user