diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-25 00:47:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-25 11:21:20 +0300 |
commit | d08ba0fdeaba03c70483d74de4401e67bbd9f020 (patch) | |
tree | 756d213dd53e438c957603e05cfd159c98cd19f0 /drivers/nfc/s3fwrn5/nci.c | |
parent | b9c28286d8f1822a10f702fcefe0b8a1db4e6917 (diff) | |
download | linux-d08ba0fdeaba03c70483d74de4401e67bbd9f020.tar.xz |
nfc: s3fwrn5: constify nci_ops
s3fwrn5 driver modifies static struct nci_ops only to set prop_ops.
Since prop_ops is build time constant with known size, it can be made
const. This allows to removeo the function setting the prop_ops -
s3fwrn5_nci_get_prop_ops().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/s3fwrn5/nci.c')
-rw-r--r-- | drivers/nfc/s3fwrn5/nci.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/nfc/s3fwrn5/nci.c b/drivers/nfc/s3fwrn5/nci.c index f042d3eaf8f6..819e3474a437 100644 --- a/drivers/nfc/s3fwrn5/nci.c +++ b/drivers/nfc/s3fwrn5/nci.c @@ -20,7 +20,7 @@ static int s3fwrn5_nci_prop_rsp(struct nci_dev *ndev, struct sk_buff *skb) return 0; } -static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = { +struct nci_driver_ops s3fwrn5_nci_prop_ops[4] = { { .opcode = nci_opcode_pack(NCI_GID_PROPRIETARY, NCI_PROP_SET_RFREG), @@ -43,12 +43,6 @@ static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = { }, }; -void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n) -{ - *ops = s3fwrn5_nci_prop_ops; - *n = ARRAY_SIZE(s3fwrn5_nci_prop_ops); -} - #define S3FWRN5_RFREG_SECTION_SIZE 252 int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name) |