summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r--drivers/usb/gadget/function/f_acm.c4
-rw-r--r--drivers/usb/gadget/function/f_ecm.c4
-rw-r--r--drivers/usb/gadget/function/f_eem.c6
-rw-r--r--drivers/usb/gadget/function/f_fs.c22
-rw-r--r--drivers/usb/gadget/function/f_hid.c6
-rw-r--r--drivers/usb/gadget/function/f_loopback.c4
-rw-r--r--drivers/usb/gadget/function/f_mass_storage.c12
-rw-r--r--drivers/usb/gadget/function/f_midi.c2
-rw-r--r--drivers/usb/gadget/function/f_midi2.c8
-rw-r--r--drivers/usb/gadget/function/f_ncm.c2
-rw-r--r--drivers/usb/gadget/function/f_obex.c4
-rw-r--r--drivers/usb/gadget/function/f_phonet.c2
-rw-r--r--drivers/usb/gadget/function/f_printer.c4
-rw-r--r--drivers/usb/gadget/function/f_rndis.c6
-rw-r--r--drivers/usb/gadget/function/f_serial.c4
-rw-r--r--drivers/usb/gadget/function/f_sourcesink.c4
-rw-r--r--drivers/usb/gadget/function/f_subset.c4
-rw-r--r--drivers/usb/gadget/function/f_tcm.c10
-rw-r--r--drivers/usb/gadget/function/f_uac1.c4
-rw-r--r--drivers/usb/gadget/function/f_uac1_legacy.c4
-rw-r--r--drivers/usb/gadget/function/f_uac2.c4
-rw-r--r--drivers/usb/gadget/function/f_uvc.c4
-rw-r--r--drivers/usb/gadget/function/rndis.c2
-rw-r--r--drivers/usb/gadget/function/u_audio.c2
-rw-r--r--drivers/usb/gadget/function/u_serial.c4
-rw-r--r--drivers/usb/gadget/function/u_uac1_legacy.c2
-rw-r--r--drivers/usb/gadget/function/uvc_configfs.c28
-rw-r--r--drivers/usb/gadget/function/uvc_v4l2.c2
-rw-r--r--drivers/usb/gadget/function/uvc_video.c2
29 files changed, 83 insertions, 83 deletions
diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c
index d34b4710f962..c628d02bfb1d 100644
--- a/drivers/usb/gadget/function/f_acm.c
+++ b/drivers/usb/gadget/function/f_acm.c
@@ -748,7 +748,7 @@ static struct usb_function *acm_alloc_func(struct usb_function_instance *fi)
struct f_serial_opts *opts;
struct f_acm *acm;
- acm = kzalloc_obj(*acm, GFP_KERNEL);
+ acm = kzalloc_obj(*acm);
if (!acm)
return ERR_PTR(-ENOMEM);
@@ -882,7 +882,7 @@ static struct usb_function_instance *acm_alloc_instance(void)
struct f_serial_opts *opts;
int ret;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
opts->protocol = USB_CDC_ACM_PROTO_AT_V25TER;
diff --git a/drivers/usb/gadget/function/f_ecm.c b/drivers/usb/gadget/function/f_ecm.c
index aa91d705bc8d..e0c02121374e 100644
--- a/drivers/usb/gadget/function/f_ecm.c
+++ b/drivers/usb/gadget/function/f_ecm.c
@@ -847,7 +847,7 @@ static struct usb_function_instance *ecm_alloc_inst(void)
{
struct f_ecm_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
@@ -927,7 +927,7 @@ static struct usb_function *ecm_alloc(struct usb_function_instance *fi)
int status;
/* allocate and initialize one new instance */
- ecm = kzalloc_obj(*ecm, GFP_KERNEL);
+ ecm = kzalloc_obj(*ecm);
if (!ecm)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_eem.c b/drivers/usb/gadget/function/f_eem.c
index acdd6c637c7b..0142a0e487ee 100644
--- a/drivers/usb/gadget/function/f_eem.c
+++ b/drivers/usb/gadget/function/f_eem.c
@@ -462,7 +462,7 @@ static int eem_unwrap(struct gether *port,
goto next;
}
- ctx = kmalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kmalloc_obj(*ctx);
if (!ctx) {
kfree(req->buf);
usb_ep_free_request(ep, req);
@@ -608,7 +608,7 @@ static struct usb_function_instance *eem_alloc_inst(void)
{
struct f_eem_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
@@ -651,7 +651,7 @@ static struct usb_function *eem_alloc(struct usb_function_instance *fi)
struct f_eem_opts *opts;
/* allocate and initialize one new instance */
- eem = kzalloc_obj(*eem, GFP_KERNEL);
+ eem = kzalloc_obj(*eem);
if (!eem)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 84cfa7a8437a..480d73c220a8 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -814,7 +814,7 @@ static void *ffs_build_sg_list(struct sg_table *sgt, size_t sz)
return NULL;
n_pages = PAGE_ALIGN(sz) >> PAGE_SHIFT;
- pages = kvmalloc_objs(struct page *, n_pages, GFP_KERNEL);
+ pages = kvmalloc_objs(struct page *, n_pages);
if (!pages) {
vfree(vaddr);
@@ -1245,7 +1245,7 @@ static ssize_t ffs_epfile_write_iter(struct kiocb *kiocb, struct iov_iter *from)
ssize_t res;
if (!is_sync_kiocb(kiocb)) {
- p = kzalloc_obj(io_data, GFP_KERNEL);
+ p = kzalloc_obj(io_data);
if (!p)
return -ENOMEM;
p->aio = true;
@@ -1280,7 +1280,7 @@ static ssize_t ffs_epfile_read_iter(struct kiocb *kiocb, struct iov_iter *to)
ssize_t res;
if (!is_sync_kiocb(kiocb)) {
- p = kzalloc_obj(io_data, GFP_KERNEL);
+ p = kzalloc_obj(io_data);
if (!p)
return -ENOMEM;
p->aio = true;
@@ -1503,7 +1503,7 @@ static int ffs_dmabuf_attach(struct file *file, int fd)
goto err_dmabuf_put;
}
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
err = -ENOMEM;
goto err_dmabuf_detach;
@@ -1652,7 +1652,7 @@ static int ffs_dmabuf_transfer(struct file *file,
if (ret)
goto err_resv_unlock;
- fence = kmalloc_obj(*fence, GFP_KERNEL);
+ fence = kmalloc_obj(*fence);
if (!fence) {
ret = -ENOMEM;
goto err_resv_unlock;
@@ -2067,7 +2067,7 @@ static int ffs_fs_init_fs_context(struct fs_context *fc)
{
struct ffs_sb_fill_data *ctx;
- ctx = kzalloc_obj(struct ffs_sb_fill_data, GFP_KERNEL);
+ ctx = kzalloc_obj(struct ffs_sb_fill_data);
if (!ctx)
return -ENOMEM;
@@ -2183,7 +2183,7 @@ static void ffs_data_closed(struct ffs_data *ffs)
static struct ffs_data *ffs_data_new(const char *dev_name)
{
- struct ffs_data *ffs = kzalloc_obj(*ffs, GFP_KERNEL);
+ struct ffs_data *ffs = kzalloc_obj(*ffs);
if (!ffs)
return NULL;
@@ -2330,7 +2330,7 @@ static int ffs_epfiles_create(struct ffs_data *ffs)
int err;
count = ffs->eps_count;
- epfiles = kzalloc_objs(*epfiles, count, GFP_KERNEL);
+ epfiles = kzalloc_objs(*epfiles, count);
if (!epfiles)
return -ENOMEM;
@@ -4031,7 +4031,7 @@ static struct usb_function_instance *ffs_alloc_inst(void)
struct f_fs_opts *opts;
struct ffs_dev *dev;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -4107,7 +4107,7 @@ static struct usb_function *ffs_alloc(struct usb_function_instance *fi)
{
struct ffs_function *func;
- func = kzalloc_obj(*func, GFP_KERNEL);
+ func = kzalloc_obj(*func);
if (!func)
return ERR_PTR(-ENOMEM);
@@ -4138,7 +4138,7 @@ static struct ffs_dev *_ffs_alloc_dev(void)
if (_ffs_get_single_dev())
return ERR_PTR(-EBUSY);
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
index 93dd678cafe1..8c855c00b887 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -650,7 +650,7 @@ static int f_hidg_get_report(struct file *file, struct usb_hidg_report __user *b
struct report_entry *ptr;
__u8 report_id;
- entry = kmalloc_obj(*entry, GFP_KERNEL);
+ entry = kmalloc_obj(*entry);
if (!entry)
return -ENOMEM;
@@ -1530,7 +1530,7 @@ static struct usb_function_instance *hidg_alloc_inst(void)
struct usb_function_instance *ret;
int status = 0;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
@@ -1596,7 +1596,7 @@ static struct usb_function *hidg_alloc(struct usb_function_instance *fi)
int ret;
/* allocate and initialize one new instance */
- hidg = kzalloc_obj(*hidg, GFP_KERNEL);
+ hidg = kzalloc_obj(*hidg);
if (!hidg)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c
index b8fa60af9385..d2d07fb49e70 100644
--- a/drivers/usb/gadget/function/f_loopback.c
+++ b/drivers/usb/gadget/function/f_loopback.c
@@ -425,7 +425,7 @@ static struct usb_function *loopback_alloc(struct usb_function_instance *fi)
struct f_loopback *loop;
struct f_lb_opts *lb_opts;
- loop = kzalloc_obj(*loop, GFP_KERNEL);
+ loop = kzalloc_obj(*loop);
if (!loop)
return ERR_PTR(-ENOMEM);
@@ -568,7 +568,7 @@ static struct usb_function_instance *loopback_alloc_instance(void)
{
struct f_lb_opts *lb_opts;
- lb_opts = kzalloc_obj(*lb_opts, GFP_KERNEL);
+ lb_opts = kzalloc_obj(*lb_opts);
if (!lb_opts)
return ERR_PTR(-ENOMEM);
mutex_init(&lb_opts->lock);
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index c894ede6bcd2..6af96e2b44eb 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -2699,7 +2699,7 @@ static void fsg_lun_release(struct device *dev)
static struct fsg_common *fsg_common_setup(struct fsg_common *common)
{
if (!common) {
- common = kzalloc_obj(*common, GFP_KERNEL);
+ common = kzalloc_obj(*common);
if (!common)
return ERR_PTR(-ENOMEM);
common->free_storage_on_release = 1;
@@ -2740,7 +2740,7 @@ int fsg_common_set_num_buffers(struct fsg_common *common, unsigned int n)
struct fsg_buffhd *bh, *buffhds;
int i;
- buffhds = kzalloc_objs(*buffhds, n, GFP_KERNEL);
+ buffhds = kzalloc_objs(*buffhds, n);
if (!buffhds)
return -ENOMEM;
@@ -2887,7 +2887,7 @@ int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg,
return -EINVAL;
}
- lun = kzalloc_obj(*lun, GFP_KERNEL);
+ lun = kzalloc_obj(*lun);
if (!lun)
return -ENOMEM;
@@ -3311,7 +3311,7 @@ static struct config_group *fsg_lun_make(struct config_group *group,
goto out;
}
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts) {
ret = -ENOMEM;
goto out;
@@ -3489,7 +3489,7 @@ static struct usb_function_instance *fsg_alloc_inst(void)
struct fsg_lun_config config;
int rc;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
@@ -3554,7 +3554,7 @@ static struct usb_function *fsg_alloc(struct usb_function_instance *fi)
struct fsg_common *common = opts->common;
struct fsg_dev *fsg;
- fsg = kzalloc_obj(*fsg, GFP_KERNEL);
+ fsg = kzalloc_obj(*fsg);
if (unlikely(!fsg))
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
index d98f946b1621..2a81ae9e6cf2 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -1279,7 +1279,7 @@ static struct usb_function_instance *f_midi_alloc_inst(void)
{
struct f_midi_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c
index 1a4feca1f083..61ce54c3392b 100644
--- a/drivers/usb/gadget/function/f_midi2.c
+++ b/drivers/usb/gadget/function/f_midi2.c
@@ -2340,7 +2340,7 @@ static int f_midi2_block_opts_create(struct f_midi2_ep_opts *ep_opts,
goto out;
}
- block_opts = kzalloc_obj(*block_opts, GFP_KERNEL);
+ block_opts = kzalloc_obj(*block_opts);
if (!block_opts) {
ret = -ENOMEM;
goto out;
@@ -2502,7 +2502,7 @@ static int f_midi2_ep_opts_create(struct f_midi2_opts *opts,
{
struct f_midi2_ep_opts *ep_opts;
- ep_opts = kzalloc_obj(*ep_opts, GFP_KERNEL);
+ ep_opts = kzalloc_obj(*ep_opts);
if (!ep_opts)
return -ENOMEM;
@@ -2652,7 +2652,7 @@ static struct usb_function_instance *f_midi2_alloc_inst(void)
struct f_midi2_block_opts *block_opts;
int ret;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -2813,7 +2813,7 @@ static struct usb_function *f_midi2_alloc(struct usb_function_instance *fi)
struct f_midi2_block *bp;
int i, num_eps, blk;
- midi2 = kzalloc_obj(*midi2, GFP_KERNEL);
+ midi2 = kzalloc_obj(*midi2);
if (!midi2)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c
index 6bbdb10ce3ca..14fc7dce6f39 100644
--- a/drivers/usb/gadget/function/f_ncm.c
+++ b/drivers/usb/gadget/function/f_ncm.c
@@ -1683,7 +1683,7 @@ static struct usb_function_instance *ncm_alloc_inst(void)
char *names[1];
struct config_group *ncm_interf_group;
- struct f_ncm_opts *opts __free(kfree) = kzalloc_obj(*opts, GFP_KERNEL);
+ struct f_ncm_opts *opts __free(kfree) = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_obex.c b/drivers/usb/gadget/function/f_obex.c
index e9e9fd70c243..715bb0decd3b 100644
--- a/drivers/usb/gadget/function/f_obex.c
+++ b/drivers/usb/gadget/function/f_obex.c
@@ -426,7 +426,7 @@ static struct usb_function_instance *obex_alloc_inst(void)
struct f_serial_opts *opts;
int ret;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -461,7 +461,7 @@ static struct usb_function *obex_alloc(struct usb_function_instance *fi)
struct f_serial_opts *opts;
/* allocate and initialize one new instance */
- obex = kzalloc_obj(*obex, GFP_KERNEL);
+ obex = kzalloc_obj(*obex);
if (!obex)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c
index b427dcae456c..aea572505ad2 100644
--- a/drivers/usb/gadget/function/f_phonet.c
+++ b/drivers/usb/gadget/function/f_phonet.c
@@ -623,7 +623,7 @@ static struct usb_function_instance *phonet_alloc_inst(void)
{
struct f_phonet_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_printer.c b/drivers/usb/gadget/function/f_printer.c
index d0e6435ac7a6..e4f7828ae75d 100644
--- a/drivers/usb/gadget/function/f_printer.c
+++ b/drivers/usb/gadget/function/f_printer.c
@@ -1374,7 +1374,7 @@ static struct usb_function_instance *gprinter_alloc_inst(void)
struct usb_function_instance *ret;
int status = 0;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -1482,7 +1482,7 @@ static struct usb_function *gprinter_alloc(struct usb_function_instance *fi)
return ERR_PTR(-ENOENT);
}
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev) {
mutex_unlock(&opts->lock);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c
index 39a87458bab4..8b11d8d6d89c 100644
--- a/drivers/usb/gadget/function/f_rndis.c
+++ b/drivers/usb/gadget/function/f_rndis.c
@@ -673,7 +673,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
rndis_opts = container_of(f->fi, struct f_rndis_opts, func_inst);
if (cdev->use_os_string) {
- os_desc_table = kzalloc_obj(*os_desc_table, GFP_KERNEL);
+ os_desc_table = kzalloc_obj(*os_desc_table);
if (!os_desc_table)
return -ENOMEM;
}
@@ -888,7 +888,7 @@ static struct usb_function_instance *rndis_alloc_inst(void)
char *names[1];
struct config_group *rndis_interf_group;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
opts->rndis_os_desc.ext_compat_id = opts->rndis_ext_compat_id;
@@ -956,7 +956,7 @@ static struct usb_function *rndis_alloc(struct usb_function_instance *fi)
struct rndis_params *params;
/* allocate and initialize one new instance */
- rndis = kzalloc_obj(*rndis, GFP_KERNEL);
+ rndis = kzalloc_obj(*rndis);
if (!rndis)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_serial.c b/drivers/usb/gadget/function/f_serial.c
index 01fc06b29ab2..ae8813c67bc7 100644
--- a/drivers/usb/gadget/function/f_serial.c
+++ b/drivers/usb/gadget/function/f_serial.c
@@ -317,7 +317,7 @@ static struct usb_function_instance *gser_alloc_inst(void)
struct f_serial_opts *opts;
int ret;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -376,7 +376,7 @@ static struct usb_function *gser_alloc(struct usb_function_instance *fi)
struct f_serial_opts *opts;
/* allocate and initialize one new instance */
- gser = kzalloc_obj(*gser, GFP_KERNEL);
+ gser = kzalloc_obj(*gser);
if (!gser)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index e77e2e83833f..d2b707e41669 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -844,7 +844,7 @@ static struct usb_function *source_sink_alloc_func(
struct f_sourcesink *ss;
struct f_ss_opts *ss_opts;
- ss = kzalloc_obj(*ss, GFP_KERNEL);
+ ss = kzalloc_obj(*ss);
if (!ss)
return ERR_PTR(-ENOMEM);
@@ -1297,7 +1297,7 @@ static struct usb_function_instance *source_sink_alloc_inst(void)
{
struct f_ss_opts *ss_opts;
- ss_opts = kzalloc_obj(*ss_opts, GFP_KERNEL);
+ ss_opts = kzalloc_obj(*ss_opts);
if (!ss_opts)
return ERR_PTR(-ENOMEM);
mutex_init(&ss_opts->lock);
diff --git a/drivers/usb/gadget/function/f_subset.c b/drivers/usb/gadget/function/f_subset.c
index 4913f60db048..076072386e5e 100644
--- a/drivers/usb/gadget/function/f_subset.c
+++ b/drivers/usb/gadget/function/f_subset.c
@@ -428,7 +428,7 @@ static struct usb_function_instance *geth_alloc_inst(void)
{
struct f_gether_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
@@ -467,7 +467,7 @@ static struct usb_function *geth_alloc(struct usb_function_instance *fi)
int status;
/* allocate and initialize one new instance */
- geth = kzalloc_obj(*geth, GFP_KERNEL);
+ geth = kzalloc_obj(*geth);
if (!geth)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index 29d6fd6ce935..ec050d8f99f1 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -1676,7 +1676,7 @@ static struct se_portal_group *usbg_make_tpg(struct se_wwn *wwn,
goto unlock_dep;
}
- tpg = kzalloc_obj(struct usbg_tpg, GFP_KERNEL);
+ tpg = kzalloc_obj(struct usbg_tpg);
ret = -ENOMEM;
if (!tpg)
goto unref_dep;
@@ -1768,7 +1768,7 @@ static struct se_wwn *usbg_make_tport(
if (!wnn_name)
return ERR_PTR(-EINVAL);
- tport = kzalloc_obj(struct usbg_tport, GFP_KERNEL);
+ tport = kzalloc_obj(struct usbg_tport);
if (!(tport))
return ERR_PTR(-ENOMEM);
@@ -1861,7 +1861,7 @@ static int tcm_usbg_make_nexus(struct usbg_tpg *tpg, char *name)
goto out_unlock;
}
- tv_nexus = kzalloc_obj(*tv_nexus, GFP_KERNEL);
+ tv_nexus = kzalloc_obj(*tv_nexus);
if (!tv_nexus) {
ret = -ENOMEM;
goto out_unlock;
@@ -2535,7 +2535,7 @@ static struct usb_function_instance *tcm_alloc_inst(void)
int i;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -2590,7 +2590,7 @@ static struct usb_function *tcm_alloc(struct usb_function_instance *fi)
return ERR_PTR(-ENODEV);
}
- fu = kzalloc_obj(*fu, GFP_KERNEL);
+ fu = kzalloc_obj(*fu);
if (!fu) {
mutex_unlock(&tpg_instances_lock);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 58ada4855de8..85c502e98f57 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -1748,7 +1748,7 @@ static struct usb_function_instance *f_audio_alloc_inst(void)
{
struct f_uac1_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -1831,7 +1831,7 @@ static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
struct f_uac1_opts *opts;
/* allocate and initialize one new instance */
- uac1 = kzalloc_obj(*uac1, GFP_KERNEL);
+ uac1 = kzalloc_obj(*uac1);
if (!uac1)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_uac1_legacy.c b/drivers/usb/gadget/function/f_uac1_legacy.c
index ed7e1f061784..a0c953a99727 100644
--- a/drivers/usb/gadget/function/f_uac1_legacy.c
+++ b/drivers/usb/gadget/function/f_uac1_legacy.c
@@ -942,7 +942,7 @@ static struct usb_function_instance *f_audio_alloc_inst(void)
{
struct f_uac1_legacy_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -985,7 +985,7 @@ static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
struct f_uac1_legacy_opts *opts;
/* allocate and initialize one new instance */
- audio = kzalloc_obj(*audio, GFP_KERNEL);
+ audio = kzalloc_obj(*audio);
if (!audio)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index c66908bbe714..897787d0803c 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -2189,7 +2189,7 @@ static struct usb_function_instance *afunc_alloc_inst(void)
{
struct f_uac2_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -2278,7 +2278,7 @@ static struct usb_function *afunc_alloc(struct usb_function_instance *fi)
struct f_uac2 *uac2;
struct f_uac2_opts *opts;
- uac2 = kzalloc_obj(*uac2, GFP_KERNEL);
+ uac2 = kzalloc_obj(*uac2);
if (uac2 == NULL)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 4b9846ab99f2..494fdbc4e85b 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -887,7 +887,7 @@ static struct usb_function_instance *uvc_alloc_inst(void)
struct uvc_descriptor_header **ctl_cls;
int ret;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return ERR_PTR(-ENOMEM);
opts->func_inst.free_func_inst = uvc_free_inst;
@@ -1042,7 +1042,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
struct uvc_descriptor_header **strm_cls;
struct config_item *streaming, *header, *h;
- uvc = kzalloc_obj(*uvc, GFP_KERNEL);
+ uvc = kzalloc_obj(*uvc);
if (uvc == NULL)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/usb/gadget/function/rndis.c b/drivers/usb/gadget/function/rndis.c
index 1e168666a3f5..3da54a7d7aba 100644
--- a/drivers/usb/gadget/function/rndis.c
+++ b/drivers/usb/gadget/function/rndis.c
@@ -892,7 +892,7 @@ struct rndis_params *rndis_register(void (*resp_avail)(void *v), void *v)
return ERR_PTR(-ENODEV);
}
- params = kzalloc_obj(*params, GFP_KERNEL);
+ params = kzalloc_obj(*params);
if (!params) {
rndis_put_nr(i);
diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
index 24c934bbf0e5..36d2fedbda11 100644
--- a/drivers/usb/gadget/function/u_audio.c
+++ b/drivers/usb/gadget/function/u_audio.c
@@ -1191,7 +1191,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
if (!g_audio)
return -EINVAL;
- uac = kzalloc_obj(*uac, GFP_KERNEL);
+ uac = kzalloc_obj(*uac);
if (!uac)
return -ENOMEM;
g_audio->uac = uac;
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index e61beaa0c53d..e43ad6373846 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1082,7 +1082,7 @@ static int gs_console_init(struct gs_port *port)
if (port->console)
return 0;
- cons = kzalloc_obj(*port->console, GFP_KERNEL);
+ cons = kzalloc_obj(*port->console);
if (!cons)
return -ENOMEM;
@@ -1215,7 +1215,7 @@ gs_port_alloc(unsigned port_num, struct usb_cdc_line_coding *coding)
goto out;
}
- port = kzalloc_obj(struct gs_port, GFP_KERNEL);
+ port = kzalloc_obj(struct gs_port);
if (port == NULL) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/usb/gadget/function/u_uac1_legacy.c b/drivers/usb/gadget/function/u_uac1_legacy.c
index e95c2fc7fc10..01016102fa17 100644
--- a/drivers/usb/gadget/function/u_uac1_legacy.c
+++ b/drivers/usb/gadget/function/u_uac1_legacy.c
@@ -106,7 +106,7 @@ static int playback_default_hw_params(struct gaudio_snd_dev *snd)
snd->channels = 2;
snd->rate = 48000;
- params = kzalloc_obj(*params, GFP_KERNEL);
+ params = kzalloc_obj(*params);
if (!params)
return -ENOMEM;
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 553057cbf63a..70a1415ea401 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -158,7 +158,7 @@ static int uvcg_config_create_group(struct config_group *parent,
{
struct config_group *group;
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
@@ -270,7 +270,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,
{
struct uvcg_control_header *h;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -1273,7 +1273,7 @@ static struct config_item *uvcg_extension_make(struct config_group *group, const
opts_item = group->cg_item.ci_parent->ci_parent;
opts = to_f_uvc_opts(opts_item);
- xu = kzalloc_obj(*xu, GFP_KERNEL);
+ xu = kzalloc_obj(*xu);
if (!xu)
return ERR_PTR(-ENOMEM);
@@ -1437,7 +1437,7 @@ static int uvcg_control_class_create_children(struct config_group *parent)
for (i = 0; i < ARRAY_SIZE(names); ++i) {
struct uvcg_control_class_group *group;
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
@@ -1785,7 +1785,7 @@ static int uvcg_streaming_header_allow_link(struct config_item *src,
uvcg_format_set_indices(to_config_group(target));
- format_ptr = kzalloc_obj(*format_ptr, GFP_KERNEL);
+ format_ptr = kzalloc_obj(*format_ptr);
if (!format_ptr) {
ret = -ENOMEM;
goto out;
@@ -1899,7 +1899,7 @@ static struct config_item
{
struct uvcg_streaming_header *h;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -2163,7 +2163,7 @@ static struct config_item *uvcg_frame_make(struct config_group *group,
struct config_item *opts_item;
struct uvcg_frame_ptr *frame_ptr;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -2197,7 +2197,7 @@ static struct config_item *uvcg_frame_make(struct config_group *group,
return ERR_PTR(-EINVAL);
}
- frame_ptr = kzalloc_obj(*frame_ptr, GFP_KERNEL);
+ frame_ptr = kzalloc_obj(*frame_ptr);
if (!frame_ptr) {
mutex_unlock(&opts->lock);
kfree(h);
@@ -2483,7 +2483,7 @@ static struct config_group *uvcg_uncompressed_make(struct config_group *group,
if (!color_match)
return ERR_PTR(-EINVAL);
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -2675,7 +2675,7 @@ static struct config_group *uvcg_mjpeg_make(struct config_group *group,
if (!color_match)
return ERR_PTR(-EINVAL);
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -2926,7 +2926,7 @@ static struct config_group *uvcg_framebased_make(struct config_group *group,
if (!color_match)
return ERR_PTR(-EINVAL);
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return ERR_PTR(-ENOMEM);
@@ -3075,7 +3075,7 @@ static struct config_group *uvcg_color_matching_make(struct config_group *group,
{
struct uvcg_color_matching *color_match;
- color_match = kzalloc_obj(*color_match, GFP_KERNEL);
+ color_match = kzalloc_obj(*color_match);
if (!color_match)
return ERR_PTR(-ENOMEM);
@@ -3097,7 +3097,7 @@ static int uvcg_color_matching_create_children(struct config_group *parent)
{
struct uvcg_color_matching *color_match;
- color_match = kzalloc_obj(*color_match, GFP_KERNEL);
+ color_match = kzalloc_obj(*color_match);
if (!color_match)
return -ENOMEM;
@@ -3553,7 +3553,7 @@ static int uvcg_streaming_class_create_children(struct config_group *parent)
for (i = 0; i < ARRAY_SIZE(names); ++i) {
struct uvcg_streaming_class_group *group;
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c
index 574b3a8986a0..ed48d38498fb 100644
--- a/drivers/usb/gadget/function/uvc_v4l2.c
+++ b/drivers/usb/gadget/function/uvc_v4l2.c
@@ -667,7 +667,7 @@ uvc_v4l2_open(struct file *file)
struct uvc_device *uvc = video_get_drvdata(vdev);
struct uvc_file_handle *handle;
- handle = kzalloc_obj(*handle, GFP_KERNEL);
+ handle = kzalloc_obj(*handle);
if (handle == NULL)
return -ENOMEM;
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index b2784a57dbcd..7cea641b06b4 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -559,7 +559,7 @@ uvc_video_alloc_requests(struct uvc_video *video)
uvc_video_prep_requests(video);
for (i = 0; i < video->uvc_num_requests; i++) {
- ureq = kzalloc_obj(struct uvc_request, GFP_KERNEL);
+ ureq = kzalloc_obj(struct uvc_request);
if (ureq == NULL)
goto error;