From c8cae40489b27ad20886df80e81cc2ea12d9d635 Mon Sep 17 00:00:00 2001 From: thompsa Date: Sat, 13 Jun 2009 04:56:45 +0000 Subject: [PATCH] Make variables static where appropriate. Found by: cscout --- sys/dev/usb/input/ukbd.c | 2 +- sys/dev/usb/serial/uchcom.c | 2 +- sys/dev/usb/serial/ufoma.c | 2 +- sys/dev/usb/serial/uplcom.c | 2 +- sys/dev/usb/serial/uslcom.c | 2 +- sys/dev/usb/storage/umass.c | 4 ++-- sys/dev/usb/storage/ustorage_fs.c | 2 +- sys/dev/usb/usb_dev.c | 2 +- sys/dev/usb/wlan/if_urtw.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index f1b047e00568..52b2176c30ac 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -1562,7 +1562,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) #endif /* UKBD_EMULATE_ATSCANCODE */ -keyboard_switch_t ukbdsw = { +static keyboard_switch_t ukbdsw = { .probe = &ukbd__probe, .init = &ukbd_init, .term = &ukbd_term, diff --git a/sys/dev/usb/serial/uchcom.c b/sys/dev/usb/serial/uchcom.c index a4b79226e4ca..6ed4905d71f5 100644 --- a/sys/dev/usb/serial/uchcom.c +++ b/sys/dev/usb/serial/uchcom.c @@ -257,7 +257,7 @@ static const struct usb_config uchcom_config_data[UCHCOM_N_TRANSFER] = { }, }; -struct ucom_callback uchcom_callback = { +static struct ucom_callback uchcom_callback = { .usb2_com_cfg_get_status = &uchcom_cfg_get_status, .usb2_com_cfg_set_dtr = &uchcom_cfg_set_dtr, .usb2_com_cfg_set_rts = &uchcom_cfg_set_rts, diff --git a/sys/dev/usb/serial/ufoma.c b/sys/dev/usb/serial/ufoma.c index 05a4ec1cb451..9b47f3d0272d 100644 --- a/sys/dev/usb/serial/ufoma.c +++ b/sys/dev/usb/serial/ufoma.c @@ -1103,7 +1103,7 @@ ufoma_stop_write(struct ucom_softc *ucom) } } -struct umcpc_modetostr_tab{ +static struct umcpc_modetostr_tab{ int mode; char *str; }umcpc_modetostr_tab[]={ diff --git a/sys/dev/usb/serial/uplcom.c b/sys/dev/usb/serial/uplcom.c index ce31a9b45e00..23d18c081c38 100644 --- a/sys/dev/usb/serial/uplcom.c +++ b/sys/dev/usb/serial/uplcom.c @@ -214,7 +214,7 @@ static const struct usb_config uplcom_config_data[UPLCOM_N_TRANSFER] = { }, }; -struct ucom_callback uplcom_callback = { +static struct ucom_callback uplcom_callback = { .usb2_com_cfg_get_status = &uplcom_cfg_get_status, .usb2_com_cfg_set_dtr = &uplcom_cfg_set_dtr, .usb2_com_cfg_set_rts = &uplcom_cfg_set_rts, diff --git a/sys/dev/usb/serial/uslcom.c b/sys/dev/usb/serial/uslcom.c index e40229b8a06d..66d94611512b 100644 --- a/sys/dev/usb/serial/uslcom.c +++ b/sys/dev/usb/serial/uslcom.c @@ -143,7 +143,7 @@ static const struct usb_config uslcom_config[USLCOM_N_TRANSFER] = { }, }; -struct ucom_callback uslcom_callback = { +static struct ucom_callback uslcom_callback = { .usb2_com_cfg_open = &uslcom_open, .usb2_com_cfg_close = &uslcom_close, .usb2_com_cfg_get_status = &uslcom_get_status, diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 2f17f91a20fd..55c199f24230 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -1074,7 +1074,7 @@ static void umass_dump_buffer(struct umass_softc *, uint8_t *, uint32_t, uint32_t); #endif -struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] = { +static struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] = { [UMASS_T_BBB_RESET1] = { .type = UE_CONTROL, @@ -1164,7 +1164,7 @@ struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] = { }, }; -struct usb_config umass_cbi_config[UMASS_T_CBI_MAX] = { +static struct usb_config umass_cbi_config[UMASS_T_CBI_MAX] = { [UMASS_T_CBI_RESET1] = { .type = UE_CONTROL, diff --git a/sys/dev/usb/storage/ustorage_fs.c b/sys/dev/usb/storage/ustorage_fs.c index 73609615a879..80dcb9b1830c 100644 --- a/sys/dev/usb/storage/ustorage_fs.c +++ b/sys/dev/usb/storage/ustorage_fs.c @@ -254,7 +254,7 @@ DRIVER_MODULE(ustorage_fs, uhub, ustorage_fs_driver, ustorage_fs_devclass, NULL, MODULE_VERSION(ustorage_fs, 0); MODULE_DEPEND(ustorage_fs, usb, 1, 1, 1); -struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = { +static struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = { [USTORAGE_FS_T_BBB_COMMAND] = { .type = UE_BULK, diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c index 22cf2921ce16..8db0c1ea26ee 100644 --- a/sys/dev/usb/usb_dev.c +++ b/sys/dev/usb/usb_dev.c @@ -120,7 +120,7 @@ struct cdevsw usb2_devsw = { static struct cdev* usb2_dev = NULL; /* character device structure used for /dev/usb */ -struct cdevsw usb2_static_devsw = { +static struct cdevsw usb2_static_devsw = { .d_version = D_VERSION, .d_ioctl = usb2_static_ioctl, .d_name = "usb" diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index 87f923e036ca..883c1d97aa8a 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -93,7 +93,7 @@ enum { (void) sc; \ } while (0) #endif -int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG; +static int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG; SYSCTL_INT(_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RW, &urtw_preamble_mode, 0, "set the preable mode (long or short)"); TUNABLE_INT("hw.usb.urtw.preamble_mode", &urtw_preamble_mode);