Skip to content

Commit

Permalink
usb: gadget: only GPL drivers in the gadget and phy framework
Browse files Browse the repository at this point in the history
We only support GPL drivers in the USB Gadget Framework,
it sounds correct to make all exported symbols GPL too.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Apr 21, 2014
1 parent 5f94adf commit 0700faa
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ void unregister_gadget_item(struct config_item *item)

unregister_gadget(gi);
}
EXPORT_SYMBOL(unregister_gadget_item);
EXPORT_SYMBOL_GPL(unregister_gadget_item);

static int __init gadget_cfs_init(void)
{
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ ffs_sb_create_file(struct super_block *sb, const char *name, void *data,
/* Devices management *******************************************************/

DEFINE_MUTEX(ffs_lock);
EXPORT_SYMBOL(ffs_lock);
EXPORT_SYMBOL_GPL(ffs_lock);

static struct ffs_dev *_ffs_find_dev(const char *name);
static struct ffs_dev *_ffs_alloc_dev(void);
Expand Down Expand Up @@ -2876,7 +2876,7 @@ int ffs_name_dev(struct ffs_dev *dev, const char *name)

return ret;
}
EXPORT_SYMBOL(ffs_name_dev);
EXPORT_SYMBOL_GPL(ffs_name_dev);

int ffs_single_dev(struct ffs_dev *dev)
{
Expand All @@ -2893,7 +2893,7 @@ int ffs_single_dev(struct ffs_dev *dev)
ffs_dev_unlock();
return ret;
}
EXPORT_SYMBOL(ffs_single_dev);
EXPORT_SYMBOL_GPL(ffs_single_dev);

/*
* ffs_lock must be taken by the caller of this function
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/f_rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net)
opts->borrowed_net = opts->bound = true;
opts->net = net;
}
EXPORT_SYMBOL(rndis_borrow_net);
EXPORT_SYMBOL_GPL(rndis_borrow_net);

static inline struct f_rndis_opts *to_f_rndis_opts(struct config_item *item)
{
Expand Down
28 changes: 14 additions & 14 deletions drivers/usb/gadget/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ int rndis_signal_connect(int configNr)
return rndis_indicate_status_msg(configNr,
RNDIS_STATUS_MEDIA_CONNECT);
}
EXPORT_SYMBOL(rndis_signal_connect);
EXPORT_SYMBOL_GPL(rndis_signal_connect);

int rndis_signal_disconnect(int configNr)
{
Expand All @@ -769,7 +769,7 @@ int rndis_signal_disconnect(int configNr)
return rndis_indicate_status_msg(configNr,
RNDIS_STATUS_MEDIA_DISCONNECT);
}
EXPORT_SYMBOL(rndis_signal_disconnect);
EXPORT_SYMBOL_GPL(rndis_signal_disconnect);

void rndis_uninit(int configNr)
{
Expand All @@ -784,13 +784,13 @@ void rndis_uninit(int configNr)
while ((buf = rndis_get_next_response(configNr, &length)))
rndis_free_response(configNr, buf);
}
EXPORT_SYMBOL(rndis_uninit);
EXPORT_SYMBOL_GPL(rndis_uninit);

void rndis_set_host_mac(int configNr, const u8 *addr)
{
rndis_per_dev_params[configNr].host_mac = addr;
}
EXPORT_SYMBOL(rndis_set_host_mac);
EXPORT_SYMBOL_GPL(rndis_set_host_mac);

/*
* Message Parser
Expand Down Expand Up @@ -873,7 +873,7 @@ int rndis_msg_parser(u8 configNr, u8 *buf)

return -ENOTSUPP;
}
EXPORT_SYMBOL(rndis_msg_parser);
EXPORT_SYMBOL_GPL(rndis_msg_parser);

int rndis_register(void (*resp_avail)(void *v), void *v)
{
Expand All @@ -895,7 +895,7 @@ int rndis_register(void (*resp_avail)(void *v), void *v)

return -ENODEV;
}
EXPORT_SYMBOL(rndis_register);
EXPORT_SYMBOL_GPL(rndis_register);

void rndis_deregister(int configNr)
{
Expand All @@ -904,7 +904,7 @@ void rndis_deregister(int configNr)
if (configNr >= RNDIS_MAX_CONFIGS) return;
rndis_per_dev_params[configNr].used = 0;
}
EXPORT_SYMBOL(rndis_deregister);
EXPORT_SYMBOL_GPL(rndis_deregister);

int rndis_set_param_dev(u8 configNr, struct net_device *dev, u16 *cdc_filter)
{
Expand All @@ -918,7 +918,7 @@ int rndis_set_param_dev(u8 configNr, struct net_device *dev, u16 *cdc_filter)

return 0;
}
EXPORT_SYMBOL(rndis_set_param_dev);
EXPORT_SYMBOL_GPL(rndis_set_param_dev);

int rndis_set_param_vendor(u8 configNr, u32 vendorID, const char *vendorDescr)
{
Expand All @@ -931,7 +931,7 @@ int rndis_set_param_vendor(u8 configNr, u32 vendorID, const char *vendorDescr)

return 0;
}
EXPORT_SYMBOL(rndis_set_param_vendor);
EXPORT_SYMBOL_GPL(rndis_set_param_vendor);

int rndis_set_param_medium(u8 configNr, u32 medium, u32 speed)
{
Expand All @@ -943,7 +943,7 @@ int rndis_set_param_medium(u8 configNr, u32 medium, u32 speed)

return 0;
}
EXPORT_SYMBOL(rndis_set_param_medium);
EXPORT_SYMBOL_GPL(rndis_set_param_medium);

void rndis_add_hdr(struct sk_buff *skb)
{
Expand All @@ -958,7 +958,7 @@ void rndis_add_hdr(struct sk_buff *skb)
header->DataOffset = cpu_to_le32(36);
header->DataLength = cpu_to_le32(skb->len - sizeof(*header));
}
EXPORT_SYMBOL(rndis_add_hdr);
EXPORT_SYMBOL_GPL(rndis_add_hdr);

void rndis_free_response(int configNr, u8 *buf)
{
Expand All @@ -975,7 +975,7 @@ void rndis_free_response(int configNr, u8 *buf)
}
}
}
EXPORT_SYMBOL(rndis_free_response);
EXPORT_SYMBOL_GPL(rndis_free_response);

u8 *rndis_get_next_response(int configNr, u32 *length)
{
Expand All @@ -997,7 +997,7 @@ u8 *rndis_get_next_response(int configNr, u32 *length)

return NULL;
}
EXPORT_SYMBOL(rndis_get_next_response);
EXPORT_SYMBOL_GPL(rndis_get_next_response);

static rndis_resp_t *rndis_add_response(int configNr, u32 length)
{
Expand Down Expand Up @@ -1041,7 +1041,7 @@ int rndis_rm_hdr(struct gether *port,
skb_queue_tail(list, skb);
return 0;
}
EXPORT_SYMBOL(rndis_rm_hdr);
EXPORT_SYMBOL_GPL(rndis_rm_hdr);

#ifdef CONFIG_USB_GADGET_DEBUG_FILES

Expand Down
52 changes: 26 additions & 26 deletions drivers/usb/gadget/storage_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct usb_interface_descriptor fsg_intf_desc = {
.bInterfaceProtocol = USB_PR_BULK, /* Adjusted during fsg_bind() */
.iInterface = FSG_STRING_INTERFACE,
};
EXPORT_SYMBOL(fsg_intf_desc);
EXPORT_SYMBOL_GPL(fsg_intf_desc);

/*
* Three full-speed endpoint descriptors: bulk-in, bulk-out, and
Expand All @@ -58,7 +58,7 @@ struct usb_endpoint_descriptor fsg_fs_bulk_in_desc = {
.bmAttributes = USB_ENDPOINT_XFER_BULK,
/* wMaxPacketSize set by autoconfiguration */
};
EXPORT_SYMBOL(fsg_fs_bulk_in_desc);
EXPORT_SYMBOL_GPL(fsg_fs_bulk_in_desc);

struct usb_endpoint_descriptor fsg_fs_bulk_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
Expand All @@ -68,15 +68,15 @@ struct usb_endpoint_descriptor fsg_fs_bulk_out_desc = {
.bmAttributes = USB_ENDPOINT_XFER_BULK,
/* wMaxPacketSize set by autoconfiguration */
};
EXPORT_SYMBOL(fsg_fs_bulk_out_desc);
EXPORT_SYMBOL_GPL(fsg_fs_bulk_out_desc);

struct usb_descriptor_header *fsg_fs_function[] = {
(struct usb_descriptor_header *) &fsg_intf_desc,
(struct usb_descriptor_header *) &fsg_fs_bulk_in_desc,
(struct usb_descriptor_header *) &fsg_fs_bulk_out_desc,
NULL,
};
EXPORT_SYMBOL(fsg_fs_function);
EXPORT_SYMBOL_GPL(fsg_fs_function);


/*
Expand All @@ -95,7 +95,7 @@ struct usb_endpoint_descriptor fsg_hs_bulk_in_desc = {
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(512),
};
EXPORT_SYMBOL(fsg_hs_bulk_in_desc);
EXPORT_SYMBOL_GPL(fsg_hs_bulk_in_desc);

struct usb_endpoint_descriptor fsg_hs_bulk_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
Expand All @@ -106,7 +106,7 @@ struct usb_endpoint_descriptor fsg_hs_bulk_out_desc = {
.wMaxPacketSize = cpu_to_le16(512),
.bInterval = 1, /* NAK every 1 uframe */
};
EXPORT_SYMBOL(fsg_hs_bulk_out_desc);
EXPORT_SYMBOL_GPL(fsg_hs_bulk_out_desc);


struct usb_descriptor_header *fsg_hs_function[] = {
Expand All @@ -115,7 +115,7 @@ struct usb_descriptor_header *fsg_hs_function[] = {
(struct usb_descriptor_header *) &fsg_hs_bulk_out_desc,
NULL,
};
EXPORT_SYMBOL(fsg_hs_function);
EXPORT_SYMBOL_GPL(fsg_hs_function);

struct usb_endpoint_descriptor fsg_ss_bulk_in_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
Expand All @@ -125,15 +125,15 @@ struct usb_endpoint_descriptor fsg_ss_bulk_in_desc = {
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(1024),
};
EXPORT_SYMBOL(fsg_ss_bulk_in_desc);
EXPORT_SYMBOL_GPL(fsg_ss_bulk_in_desc);

struct usb_ss_ep_comp_descriptor fsg_ss_bulk_in_comp_desc = {
.bLength = sizeof(fsg_ss_bulk_in_comp_desc),
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,

/*.bMaxBurst = DYNAMIC, */
};
EXPORT_SYMBOL(fsg_ss_bulk_in_comp_desc);
EXPORT_SYMBOL_GPL(fsg_ss_bulk_in_comp_desc);

struct usb_endpoint_descriptor fsg_ss_bulk_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
Expand All @@ -143,15 +143,15 @@ struct usb_endpoint_descriptor fsg_ss_bulk_out_desc = {
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(1024),
};
EXPORT_SYMBOL(fsg_ss_bulk_out_desc);
EXPORT_SYMBOL_GPL(fsg_ss_bulk_out_desc);

struct usb_ss_ep_comp_descriptor fsg_ss_bulk_out_comp_desc = {
.bLength = sizeof(fsg_ss_bulk_in_comp_desc),
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,

/*.bMaxBurst = DYNAMIC, */
};
EXPORT_SYMBOL(fsg_ss_bulk_out_comp_desc);
EXPORT_SYMBOL_GPL(fsg_ss_bulk_out_comp_desc);

struct usb_descriptor_header *fsg_ss_function[] = {
(struct usb_descriptor_header *) &fsg_intf_desc,
Expand All @@ -161,7 +161,7 @@ struct usb_descriptor_header *fsg_ss_function[] = {
(struct usb_descriptor_header *) &fsg_ss_bulk_out_comp_desc,
NULL,
};
EXPORT_SYMBOL(fsg_ss_function);
EXPORT_SYMBOL_GPL(fsg_ss_function);


/*-------------------------------------------------------------------------*/
Expand All @@ -179,7 +179,7 @@ void fsg_lun_close(struct fsg_lun *curlun)
curlun->filp = NULL;
}
}
EXPORT_SYMBOL(fsg_lun_close);
EXPORT_SYMBOL_GPL(fsg_lun_close);

int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
{
Expand Down Expand Up @@ -278,7 +278,7 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
fput(filp);
return rc;
}
EXPORT_SYMBOL(fsg_lun_open);
EXPORT_SYMBOL_GPL(fsg_lun_open);


/*-------------------------------------------------------------------------*/
Expand All @@ -295,7 +295,7 @@ int fsg_lun_fsync_sub(struct fsg_lun *curlun)
return 0;
return vfs_fsync(filp, 1);
}
EXPORT_SYMBOL(fsg_lun_fsync_sub);
EXPORT_SYMBOL_GPL(fsg_lun_fsync_sub);

void store_cdrom_address(u8 *dest, int msf, u32 addr)
{
Expand All @@ -314,7 +314,7 @@ void store_cdrom_address(u8 *dest, int msf, u32 addr)
put_unaligned_be32(addr, dest);
}
}
EXPORT_SYMBOL(store_cdrom_address);
EXPORT_SYMBOL_GPL(store_cdrom_address);

/*-------------------------------------------------------------------------*/

Expand All @@ -325,13 +325,13 @@ ssize_t fsg_show_ro(struct fsg_lun *curlun, char *buf)
? curlun->ro
: curlun->initially_ro);
}
EXPORT_SYMBOL(fsg_show_ro);
EXPORT_SYMBOL_GPL(fsg_show_ro);

ssize_t fsg_show_nofua(struct fsg_lun *curlun, char *buf)
{
return sprintf(buf, "%u\n", curlun->nofua);
}
EXPORT_SYMBOL(fsg_show_nofua);
EXPORT_SYMBOL_GPL(fsg_show_nofua);

ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
char *buf)
Expand All @@ -357,19 +357,19 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
up_read(filesem);
return rc;
}
EXPORT_SYMBOL(fsg_show_file);
EXPORT_SYMBOL_GPL(fsg_show_file);

ssize_t fsg_show_cdrom(struct fsg_lun *curlun, char *buf)
{
return sprintf(buf, "%u\n", curlun->cdrom);
}
EXPORT_SYMBOL(fsg_show_cdrom);
EXPORT_SYMBOL_GPL(fsg_show_cdrom);

ssize_t fsg_show_removable(struct fsg_lun *curlun, char *buf)
{
return sprintf(buf, "%u\n", curlun->removable);
}
EXPORT_SYMBOL(fsg_show_removable);
EXPORT_SYMBOL_GPL(fsg_show_removable);

/*
* The caller must hold fsg->filesem for reading when calling this function.
Expand Down Expand Up @@ -410,7 +410,7 @@ ssize_t fsg_store_ro(struct fsg_lun *curlun, struct rw_semaphore *filesem,

return rc;
}
EXPORT_SYMBOL(fsg_store_ro);
EXPORT_SYMBOL_GPL(fsg_store_ro);

ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)
{
Expand All @@ -429,7 +429,7 @@ ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)

return count;
}
EXPORT_SYMBOL(fsg_store_nofua);
EXPORT_SYMBOL_GPL(fsg_store_nofua);

ssize_t fsg_store_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
const char *buf, size_t count)
Expand Down Expand Up @@ -460,7 +460,7 @@ ssize_t fsg_store_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
up_write(filesem);
return (rc < 0 ? rc : count);
}
EXPORT_SYMBOL(fsg_store_file);
EXPORT_SYMBOL_GPL(fsg_store_file);

ssize_t fsg_store_cdrom(struct fsg_lun *curlun, struct rw_semaphore *filesem,
const char *buf, size_t count)
Expand All @@ -483,7 +483,7 @@ ssize_t fsg_store_cdrom(struct fsg_lun *curlun, struct rw_semaphore *filesem,

return ret;
}
EXPORT_SYMBOL(fsg_store_cdrom);
EXPORT_SYMBOL_GPL(fsg_store_cdrom);

ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,
size_t count)
Expand All @@ -499,6 +499,6 @@ ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,

return count;
}
EXPORT_SYMBOL(fsg_store_removable);
EXPORT_SYMBOL_GPL(fsg_store_removable);

MODULE_LICENSE("GPL");
Loading

0 comments on commit 0700faa

Please sign in to comment.