Skip to content

Commit 06ff5da

Browse files
Colin Ian KingStefan Schmidt
authored andcommitted
ieee802154: atusb: make two structures static, fixes warnings
The arrays atusb_chip_data and hulusb_chip_data are local to the source and do not need to be in global scope, so make them static. Also remove unnecessary forward declaration of atusb_chip_data. Cleans up sparse warnings: symbol 'atusb_chip_data' was not declared. Should it be static? symbol 'hulusb_chip_data' was not declared. Should it be static? Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Stefan Schmidt <[email protected]>
1 parent 7635569 commit 06ff5da

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/ieee802154/atusb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
#define ATUSB_ALLOC_DELAY_MS 100 /* delay after failed allocation */
4646
#define ATUSB_TX_TIMEOUT_MS 200 /* on the air timeout */
4747

48-
struct atusb_chip_data;
49-
5048
struct atusb {
5149
struct ieee802154_hw *hw;
5250
struct usb_device *usb_dev;
@@ -767,14 +765,14 @@ atusb_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
767765
return 0;
768766
}
769767

770-
struct atusb_chip_data atusb_chip_data = {
768+
static struct atusb_chip_data atusb_chip_data = {
771769
.t_channel_switch = 1,
772770
.rssi_base_val = -91,
773771
.set_txpower = atusb_set_txpower,
774772
.set_channel = atusb_set_channel,
775773
};
776774

777-
struct atusb_chip_data hulusb_chip_data = {
775+
static struct atusb_chip_data hulusb_chip_data = {
778776
.t_channel_switch = 11,
779777
.rssi_base_val = -100,
780778
.set_txpower = hulusb_set_txpower,

0 commit comments

Comments
 (0)