mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 20:34:20 +08:00
nfc: microread: constify several pointers
Several functions do not modify pointed data so arguments and local variables can be const for correctness and safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3d463dd502
commit
a751449f8b
@ -73,7 +73,7 @@ static void microread_i2c_remove_len_crc(struct sk_buff *skb)
|
||||
skb_trim(skb, MICROREAD_I2C_FRAME_TAILROOM);
|
||||
}
|
||||
|
||||
static int check_crc(struct sk_buff *skb)
|
||||
static int check_crc(const struct sk_buff *skb)
|
||||
{
|
||||
int i;
|
||||
u8 crc = 0;
|
||||
|
@ -358,7 +358,7 @@ static int microread_complete_target_discovered(struct nfc_hci_dev *hdev,
|
||||
static void microread_im_transceive_cb(void *context, struct sk_buff *skb,
|
||||
int err)
|
||||
{
|
||||
struct microread_info *info = context;
|
||||
const struct microread_info *info = context;
|
||||
|
||||
switch (info->async_cb_type) {
|
||||
case MICROREAD_CB_TYPE_READER_ALL:
|
||||
@ -642,7 +642,7 @@ static const struct nfc_hci_ops microread_hci_ops = {
|
||||
};
|
||||
|
||||
int microread_probe(void *phy_id, const struct nfc_phy_ops *phy_ops,
|
||||
char *llc_name, int phy_headroom, int phy_tailroom,
|
||||
const char *llc_name, int phy_headroom, int phy_tailroom,
|
||||
int phy_payload, struct nfc_hci_dev **hdev)
|
||||
{
|
||||
struct microread_info *info;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#define DRIVER_DESC "NFC driver for microread"
|
||||
|
||||
int microread_probe(void *phy_id, const struct nfc_phy_ops *phy_ops,
|
||||
char *llc_name, int phy_headroom, int phy_tailroom,
|
||||
const char *llc_name, int phy_headroom, int phy_tailroom,
|
||||
int phy_payload, struct nfc_hci_dev **hdev);
|
||||
|
||||
void microread_remove(struct nfc_hci_dev *hdev);
|
||||
|
Loading…
Reference in New Issue
Block a user