diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-26 21:14:21 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-26 21:14:21 +0300 |
commit | 8900d92fd666d936a7bfb4c567ac26736a414fb4 (patch) | |
tree | 19c37bab5adc8d40d825cb629edf0e8a337955a2 /drivers/staging/greybus | |
parent | c01c0716ccf5db2086d9693033472f37de96a699 (diff) | |
parent | c295d3007ff63064181befa734d9705dfc10b396 (diff) | |
download | linux-8900d92fd666d936a7bfb4c567ac26736a414fb4.tar.xz |
Merge tag 'staging-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO driver updates from Greg KH:
"Here is the big set of staging and IIO driver updates for 5.13-rc1.
Lots of little churn in here, and some larger churn as well. Major
things are:
- removal of wimax drivers, no one has this hardware anymore for this
failed "experiment".
- removal of the Google gasket driver, turns out no one wanted to
maintain it or cares about it anymore, so they asked for it to be
removed.
- comedi finally moves out of the staging directory into drivers/comedi
This is one of the oldest kernel subsystems around, being created
in the 2.0 kernel days, and was one of the first things added to
drivers/staging/ when that was created over 15 years ago.
It should have been moved out of staging a long time ago, it's well
maintained and used by loads of different devices in the real world
every day. Nice to see this finally happen.
- so many tiny coding style cleanups it's not funny.
Perfect storm of at least 2 different intern project application
deadlines combined to provide a huge number of new contributions in
this area from people learning how to do kernel development. Great
job to everyone involved here.
There's also the normal updates for IIO drivers with new IIO drivers
and updates all over that subsystem.
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (907 commits)
staging: octeon: Use 'for_each_child_of_node'
Staging: rtl8723bs: rtw_xmit: fixed tabbing issue
staging: rtl8188eu: remove unused function parameters
staging: rtl8188eu: cmdThread is a task_struct
staging: rtl8188eu: remove constant variable and dead code
staging: rtl8188eu: change bLeisurePs' type to bool
staging: rtl8723bs: remove empty #ifdef block
staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations
staging: rtl8723bs: split too long line
staging: rtl8723bs: fix indentation in if block
staging: rtl8723bs: fix code indent issue
staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*()
staging: rtl8192e: indent statement properly
staging: rtl8723bs: Remove led_blink_hdl() and everything related
staging: comedi: move out of staging directory
staging: rtl8723bs: remove sdio_drv_priv structure
staging: rtl8723bs: remove unused argument in function
staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration
staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()
staging: rtl8723bs: fix indentation issue introduced by long line split
...
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r-- | drivers/staging/greybus/arche-platform.c | 10 | ||||
-rw-r--r-- | drivers/staging/greybus/audio_module.c | 4 | ||||
-rw-r--r-- | drivers/staging/greybus/audio_topology.c | 12 | ||||
-rw-r--r-- | drivers/staging/greybus/camera.c | 13 | ||||
-rw-r--r-- | drivers/staging/greybus/sdio.c | 1 |
5 files changed, 15 insertions, 25 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index eebf0deb39f5..e374dfc0c92f 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -77,9 +77,8 @@ static void arche_platform_set_state(struct arche_platform_drvdata *arche_pdata, } /* Requires arche_pdata->wake_lock is held by calling context */ -static void arche_platform_set_wake_detect_state( - struct arche_platform_drvdata *arche_pdata, - enum svc_wakedetect_state state) +static void arche_platform_set_wake_detect_state(struct arche_platform_drvdata *arche_pdata, + enum svc_wakedetect_state state) { arche_pdata->wake_detect_state = state; } @@ -181,9 +180,8 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) WD_STATE_COLDBOOT_START) { arche_platform_set_wake_detect_state(arche_pdata, WD_STATE_COLDBOOT_TRIG); - spin_unlock_irqrestore( - &arche_pdata->wake_lock, - flags); + spin_unlock_irqrestore(&arche_pdata->wake_lock, + flags); return IRQ_WAKE_THREAD; } } diff --git a/drivers/staging/greybus/audio_module.c b/drivers/staging/greybus/audio_module.c index 0f9fdc077b4c..12c376c477b3 100644 --- a/drivers/staging/greybus/audio_module.c +++ b/drivers/staging/greybus/audio_module.c @@ -260,7 +260,7 @@ static int gb_audio_probe(struct gb_bundle *bundle, INIT_LIST_HEAD(&gbmodule->widget_ctl_list); INIT_LIST_HEAD(&gbmodule->jack_list); gbmodule->dev = dev; - snprintf(gbmodule->name, NAME_SIZE, "%s.%s", dev->driver->name, + snprintf(gbmodule->name, sizeof(gbmodule->name), "%s.%s", dev->driver->name, dev_name(dev)); greybus_set_drvdata(bundle, gbmodule); @@ -342,7 +342,7 @@ static int gb_audio_probe(struct gb_bundle *bundle, /* inform above layer for uevent */ dev_dbg(dev, "Inform set_event:%d to above layer\n", 1); /* prepare for the audio manager */ - strscpy(desc.name, gbmodule->name, GB_AUDIO_MANAGER_MODULE_NAME_LEN); + strscpy(desc.name, gbmodule->name, sizeof(desc.name)); desc.vid = 2; /* todo */ desc.pid = 3; /* todo */ desc.intf_id = gbmodule->dev_id; diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c index e816e4db555e..1fc7727ab7be 100644 --- a/drivers/staging/greybus/audio_topology.c +++ b/drivers/staging/greybus/audio_topology.c @@ -200,7 +200,7 @@ static int gbcodec_mixer_ctl_info(struct snd_kcontrol *kcontrol, return -EINVAL; name = gbaudio_map_controlid(module, data->ctl_id, uinfo->value.enumerated.item); - strscpy(uinfo->value.enumerated.name, name, NAME_SIZE); + strscpy(uinfo->value.enumerated.name, name, sizeof(uinfo->value.enumerated.name)); break; default: dev_err(comp->dev, "Invalid type: %d for %s:kcontrol\n", @@ -363,7 +363,7 @@ static int gbcodec_mixer_dapm_ctl_info(struct snd_kcontrol *kcontrol, platform_min = le32_to_cpu(info->value.integer.min); if (platform_max == 1 && - !strnstr(kcontrol->id.name, " Volume", NAME_SIZE)) + !strnstr(kcontrol->id.name, " Volume", sizeof(kcontrol->id.name))) uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; else uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; @@ -1047,8 +1047,8 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module, } /* Prefix dev_id to widget control_name */ - strscpy(temp_name, w->name, NAME_SIZE); - snprintf(w->name, NAME_SIZE, "GB %d %s", module->dev_id, temp_name); + strscpy(temp_name, w->name, sizeof(temp_name)); + snprintf(w->name, sizeof(w->name), "GB %d %s", module->dev_id, temp_name); switch (w->type) { case snd_soc_dapm_spk: @@ -1169,8 +1169,8 @@ static int gbaudio_tplg_process_kcontrols(struct gbaudio_module_info *module, } control->id = curr->id; /* Prefix dev_id to widget_name */ - strscpy(temp_name, curr->name, NAME_SIZE); - snprintf(curr->name, NAME_SIZE, "GB %d %s", module->dev_id, + strscpy(temp_name, curr->name, sizeof(temp_name)); + snprintf(curr->name, sizeof(curr->name), "GB %d %s", module->dev_id, temp_name); control->name = curr->name; if (curr->info.type == GB_AUDIO_CTL_ELEM_TYPE_ENUMERATED) { diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index b570e13394ac..cdbb42cd413b 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -1120,16 +1120,9 @@ static ssize_t gb_camera_debugfs_write(struct file *file, if (len > 1024) return -EINVAL; - kbuf = kmalloc(len + 1, GFP_KERNEL); - if (!kbuf) - return -ENOMEM; - - if (copy_from_user(kbuf, buf, len)) { - ret = -EFAULT; - goto done; - } - - kbuf[len] = '\0'; + kbuf = memdup_user_nul(buf, len); + if (IS_ERR(kbuf)) + return PTR_ERR(kbuf); ret = op->execute(gcam, kbuf, len); diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c index 0939f4a4c963..37bf04c22dbc 100644 --- a/drivers/staging/greybus/sdio.c +++ b/drivers/staging/greybus/sdio.c @@ -33,7 +33,6 @@ struct gb_sdio_host { bool read_only; }; - #define GB_SDIO_RSP_R1_R5_R6_R7 (GB_SDIO_RSP_PRESENT | GB_SDIO_RSP_CRC | \ GB_SDIO_RSP_OPCODE) #define GB_SDIO_RSP_R3_R4 (GB_SDIO_RSP_PRESENT) |