Skip to content

Commit be81389

Browse files
committed
Merge tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH: "Here is the big set of staging driver changes for 6.10-rc1. Not a lot of cleanups happening this kernel release, intern applications must be out of sync at the moment. But we did delete two drivers, wlan-ng and pi433, as they are no longer in use and the developers involved wanted them just gone entirely, allowing us to drop 19k lines from the tree. Other than the normal coding style cleanups here, there has been a lot of work on the vc04_services code, with the intent to finally get that out of staging hopefully soon. It's getting closer, which is nice to see. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (98 commits) staging: pi433: Remove unused driver staging: vchiq_core: Add missing blank lines staging: vchiq_core: Drop unnecessary blank lines staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT staging: vchiq_core: Use printk messages for devices staging: vchiq_arm: Drop unnecessary NULL check staging: vc04_services: Delete unnecessary NULL check staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences Staging: rtl8192e: Rename variable DssCCk Staging: rtl8192e: Rename variable ExtHTCapInfo Staging: rtl8192e: Rename variable MPDUDensity Staging: rtl8192e: Rename variable MaxRxAMPDUFactor Staging: rtl8192e: Rename variable MaxAMSDUSize Staging: rtl8192e: Rename variable DelayBA Staging: rtl8192e: Rename variable RxSTBC Staging: rtl8192e: Rename variable TxSTBC Staging: rtl8192e: Rename variable GreenField Staging: rtl8192e: Rename variable ShortGI20Mhz Staging: rtl8192e: Rename variable ShortGI40Mhz Staging: rtl8192e: Rename variable MimoPwrSave ...
2 parents f6b8e86 + eb563dc commit be81389

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+533
-19333
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21241,7 +21241,7 @@ S: Maintained
2124121241
F: drivers/staging/sm750fb/
2124221242

2124321243
STAGING - VIA VT665X DRIVERS
21244-
M: Forest Bond <[email protected]>
21244+
M: Philipp Hortmann <[email protected]>
2124521245
S: Odd Fixes
2124621246
F: drivers/staging/vt665?/
2124721247

drivers/staging/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ menuconfig STAGING
2424

2525
if STAGING
2626

27-
source "drivers/staging/wlan-ng/Kconfig"
28-
2927
source "drivers/staging/olpc_dcon/Kconfig"
3028

3129
source "drivers/staging/rtl8192e/Kconfig"
@@ -62,8 +60,6 @@ source "drivers/staging/greybus/Kconfig"
6260

6361
source "drivers/staging/vc04_services/Kconfig"
6462

65-
source "drivers/staging/pi433/Kconfig"
66-
6763
source "drivers/staging/axis-fifo/Kconfig"
6864

6965
source "drivers/staging/fieldbus/Kconfig"

drivers/staging/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Makefile for staging directory
33

44
obj-y += media/
5-
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
65
obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/
76
obj-$(CONFIG_RTL8192E) += rtl8192e/
87
obj-$(CONFIG_RTL8723BS) += rtl8723bs/
@@ -21,6 +20,5 @@ obj-$(CONFIG_MOST) += most/
2120
obj-$(CONFIG_KS7010) += ks7010/
2221
obj-$(CONFIG_GREYBUS) += greybus/
2322
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
24-
obj-$(CONFIG_PI433) += pi433/
2523
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
2624
obj-$(CONFIG_FIELDBUS_DEV) += fieldbus/

drivers/staging/axis-fifo/axis-fifo.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
376376
*/
377377
mutex_lock(&fifo->read_lock);
378378
ret = wait_event_interruptible_timeout(fifo->read_queue,
379-
ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
380-
read_timeout);
379+
ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
380+
read_timeout);
381381

382382
if (ret <= 0) {
383383
if (ret == 0) {
@@ -517,9 +517,9 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
517517
*/
518518
mutex_lock(&fifo->write_lock);
519519
ret = wait_event_interruptible_timeout(fifo->write_queue,
520-
ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
521-
>= words_to_write,
522-
write_timeout);
520+
ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
521+
>= words_to_write,
522+
write_timeout);
523523

524524
if (ret <= 0) {
525525
if (ret == 0) {

drivers/staging/fbtft/fb_seps525.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
* GNU General Public License for more details.
1717
*/
1818

19-
#include <linux/module.h>
20-
#include <linux/kernel.h>
21-
#include <linux/init.h>
22-
#include <linux/gpio.h>
19+
#include <linux/bits.h>
2320
#include <linux/delay.h>
21+
#include <linux/init.h>
22+
#include <linux/module.h>
2423

2524
#include "fbtft.h"
2625

drivers/staging/greybus/arche-apb-ctrl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ static const struct of_device_id arche_apb_ctrl_of_match[] = {
466466
{ .compatible = "usbffff,2", },
467467
{ },
468468
};
469+
MODULE_DEVICE_TABLE(of, arche_apb_ctrl_of_match);
469470

470471
static struct platform_driver arche_apb_ctrl_device_driver = {
471472
.probe = arche_apb_ctrl_probe,

drivers/staging/greybus/arche-platform.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,7 @@ static const struct of_device_id arche_platform_of_match[] = {
619619
{ .compatible = "google,arche-platform", },
620620
{ },
621621
};
622-
623-
static const struct of_device_id arche_combined_id[] = {
624-
/* Use PID/VID of SVC device */
625-
{ .compatible = "google,arche-platform", },
626-
{ .compatible = "usbffff,2", },
627-
{ },
628-
};
629-
MODULE_DEVICE_TABLE(of, arche_combined_id);
622+
MODULE_DEVICE_TABLE(of, arche_platform_of_match);
630623

631624
static struct platform_driver arche_platform_device_driver = {
632625
.probe = arche_platform_probe,

drivers/staging/greybus/audio_manager_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static struct attribute *gb_audio_module_default_attrs[] = {
144144
};
145145
ATTRIBUTE_GROUPS(gb_audio_module_default);
146146

147-
static struct kobj_type gb_audio_module_type = {
147+
static const struct kobj_type gb_audio_module_type = {
148148
.sysfs_ops = &gb_audio_module_sysfs_ops,
149149
.release = gb_audio_module_release,
150150
.default_groups = gb_audio_module_default_groups,

drivers/staging/greybus/camera.c

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ static const struct gb_camera_fmt_info *gb_camera_get_format_info(u16 gb_fmt)
180180

181181
#define GB_CAMERA_MAX_SETTINGS_SIZE 8192
182182

183-
#define gcam_dbg(gcam, format...) dev_dbg(&gcam->bundle->dev, format)
184-
#define gcam_info(gcam, format...) dev_info(&gcam->bundle->dev, format)
185-
#define gcam_err(gcam, format...) dev_err(&gcam->bundle->dev, format)
186-
187183
static int gb_camera_operation_sync_flags(struct gb_connection *connection,
188184
int type, unsigned int flags,
189185
void *request, size_t request_size,
@@ -232,27 +228,27 @@ static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,
232228

233229
fmt_info = gb_camera_get_format_info(cfg->format);
234230
if (!fmt_info) {
235-
gcam_err(gcam, "unsupported greybus image format: %d\n",
236-
cfg->format);
231+
dev_err(&gcam->bundle->dev, "unsupported greybus image format: %d\n",
232+
cfg->format);
237233
return -EIO;
238234
}
239235

240236
if (fmt_info->bpp == 0) {
241237
pkt_size = le32_to_cpu(cfg->max_pkt_size);
242238

243239
if (pkt_size == 0) {
244-
gcam_err(gcam,
245-
"Stream %u: invalid zero maximum packet size\n",
246-
i);
240+
dev_err(&gcam->bundle->dev,
241+
"Stream %u: invalid zero maximum packet size\n",
242+
i);
247243
return -EIO;
248244
}
249245
} else {
250246
pkt_size = le16_to_cpu(cfg->width) * fmt_info->bpp / 8;
251247

252248
if (pkt_size != le32_to_cpu(cfg->max_pkt_size)) {
253-
gcam_err(gcam,
254-
"Stream %u: maximum packet size mismatch (%u/%u)\n",
255-
i, pkt_size, cfg->max_pkt_size);
249+
dev_err(&gcam->bundle->dev,
250+
"Stream %u: maximum packet size mismatch (%u/%u)\n",
251+
i, pkt_size, cfg->max_pkt_size);
256252
return -EIO;
257253
}
258254
}
@@ -275,21 +271,21 @@ static const int gb_camera_configure_streams_validate_response(struct gb_camera
275271

276272
/* Validate the returned response structure */
277273
if (resp->padding[0] || resp->padding[1]) {
278-
gcam_err(gcam, "response padding != 0\n");
274+
dev_err(&gcam->bundle->dev, "response padding != 0\n");
279275
return -EIO;
280276
}
281277

282278
if (resp->num_streams > nstreams) {
283-
gcam_err(gcam, "got #streams %u > request %u\n",
284-
resp->num_streams, nstreams);
279+
dev_err(&gcam->bundle->dev, "got #streams %u > request %u\n",
280+
resp->num_streams, nstreams);
285281
return -EIO;
286282
}
287283

288284
for (i = 0; i < resp->num_streams; i++) {
289285
struct gb_camera_stream_config_response *cfg = &resp->config[i];
290286

291287
if (cfg->padding) {
292-
gcam_err(gcam, "stream #%u padding != 0\n", i);
288+
dev_err(&gcam->bundle->dev, "stream #%u padding != 0\n", i);
293289
return -EIO;
294290
}
295291
}
@@ -340,16 +336,16 @@ static int gb_camera_set_power_mode(struct gb_camera *gcam, bool hs)
340336

341337
ret = gb_camera_set_intf_power_mode(gcam, intf->interface_id, hs);
342338
if (ret < 0) {
343-
gcam_err(gcam, "failed to set module interface to %s (%d)\n",
344-
hs ? "HS" : "PWM", ret);
339+
dev_err(&gcam->bundle->dev, "failed to set module interface to %s (%d)\n",
340+
hs ? "HS" : "PWM", ret);
345341
return ret;
346342
}
347343

348344
ret = gb_camera_set_intf_power_mode(gcam, svc->ap_intf_id, hs);
349345
if (ret < 0) {
350346
gb_camera_set_intf_power_mode(gcam, intf->interface_id, !hs);
351-
gcam_err(gcam, "failed to set AP interface to %s (%d)\n",
352-
hs ? "HS" : "PWM", ret);
347+
dev_err(&gcam->bundle->dev, "failed to set AP interface to %s (%d)\n",
348+
hs ? "HS" : "PWM", ret);
353349
return ret;
354350
}
355351

@@ -435,7 +431,7 @@ static int gb_camera_setup_data_connection(struct gb_camera *gcam,
435431
sizeof(csi_cfg),
436432
GB_APB_REQUEST_CSI_TX_CONTROL, false);
437433
if (ret < 0) {
438-
gcam_err(gcam, "failed to start the CSI transmitter\n");
434+
dev_err(&gcam->bundle->dev, "failed to start the CSI transmitter\n");
439435
goto error_power;
440436
}
441437

@@ -470,7 +466,7 @@ static void gb_camera_teardown_data_connection(struct gb_camera *gcam)
470466
GB_APB_REQUEST_CSI_TX_CONTROL, false);
471467

472468
if (ret < 0)
473-
gcam_err(gcam, "failed to stop the CSI transmitter\n");
469+
dev_err(&gcam->bundle->dev, "failed to stop the CSI transmitter\n");
474470

475471
/* Set the UniPro link to low speed mode. */
476472
gb_camera_set_power_mode(gcam, false);
@@ -507,7 +503,7 @@ static int gb_camera_capabilities(struct gb_camera *gcam,
507503
NULL, 0,
508504
(void *)capabilities, size);
509505
if (ret)
510-
gcam_err(gcam, "failed to retrieve capabilities: %d\n", ret);
506+
dev_err(&gcam->bundle->dev, "failed to retrieve capabilities: %d\n", ret);
511507

512508
done:
513509
mutex_unlock(&gcam->mutex);
@@ -723,22 +719,22 @@ static int gb_camera_request_handler(struct gb_operation *op)
723719
struct gb_message *request;
724720

725721
if (op->type != GB_CAMERA_TYPE_METADATA) {
726-
gcam_err(gcam, "Unsupported unsolicited event: %u\n", op->type);
722+
dev_err(&gcam->bundle->dev, "Unsupported unsolicited event: %u\n", op->type);
727723
return -EINVAL;
728724
}
729725

730726
request = op->request;
731727

732728
if (request->payload_size < sizeof(*payload)) {
733-
gcam_err(gcam, "Wrong event size received (%zu < %zu)\n",
734-
request->payload_size, sizeof(*payload));
729+
dev_err(&gcam->bundle->dev, "Wrong event size received (%zu < %zu)\n",
730+
request->payload_size, sizeof(*payload));
735731
return -EINVAL;
736732
}
737733

738734
payload = request->payload;
739735

740-
gcam_dbg(gcam, "received metadata for request %u, frame %u, stream %u\n",
741-
payload->request_id, payload->frame_number, payload->stream);
736+
dev_dbg(&gcam->bundle->dev, "received metadata for request %u, frame %u, stream %u\n",
737+
payload->request_id, payload->frame_number, payload->stream);
742738

743739
return 0;
744740
}
@@ -1347,15 +1343,15 @@ static int gb_camera_resume(struct device *dev)
13471343

13481344
ret = gb_connection_enable(gcam->connection);
13491345
if (ret) {
1350-
gcam_err(gcam, "failed to enable connection: %d\n", ret);
1346+
dev_err(&gcam->bundle->dev, "failed to enable connection: %d\n", ret);
13511347
return ret;
13521348
}
13531349

13541350
if (gcam->data_connection) {
13551351
ret = gb_connection_enable(gcam->data_connection);
13561352
if (ret) {
1357-
gcam_err(gcam,
1358-
"failed to enable data connection: %d\n", ret);
1353+
dev_err(&gcam->bundle->dev,
1354+
"failed to enable data connection: %d\n", ret);
13591355
return ret;
13601356
}
13611357
}

drivers/staging/greybus/fw-management.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ static int fw_mgmt_interface_fw_version_operation(struct fw_mgmt *fw_mgmt,
123123
fw_info->major = le16_to_cpu(response.major);
124124
fw_info->minor = le16_to_cpu(response.minor);
125125

126-
strncpy(fw_info->firmware_tag, response.firmware_tag,
127-
GB_FIRMWARE_TAG_MAX_SIZE);
126+
strscpy_pad(fw_info->firmware_tag, response.firmware_tag);
128127

129128
/*
130129
* The firmware-tag should be NULL terminated, otherwise throw error but
@@ -153,7 +152,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt,
153152
}
154153

155154
request.load_method = load_method;
156-
strncpy(request.firmware_tag, tag, GB_FIRMWARE_TAG_MAX_SIZE);
155+
strscpy_pad(request.firmware_tag, tag);
157156

158157
/*
159158
* The firmware-tag should be NULL terminated, otherwise throw error and
@@ -249,8 +248,7 @@ static int fw_mgmt_backend_fw_version_operation(struct fw_mgmt *fw_mgmt,
249248
struct gb_fw_mgmt_backend_fw_version_response response;
250249
int ret;
251250

252-
strncpy(request.firmware_tag, fw_info->firmware_tag,
253-
GB_FIRMWARE_TAG_MAX_SIZE);
251+
strscpy_pad(request.firmware_tag, fw_info->firmware_tag);
254252

255253
/*
256254
* The firmware-tag should be NULL terminated, otherwise throw error and
@@ -303,13 +301,13 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt,
303301
struct gb_fw_mgmt_backend_fw_update_request request;
304302
int ret;
305303

306-
strncpy(request.firmware_tag, tag, GB_FIRMWARE_TAG_MAX_SIZE);
304+
ret = strscpy_pad(request.firmware_tag, tag);
307305

308306
/*
309307
* The firmware-tag should be NULL terminated, otherwise throw error and
310308
* fail.
311309
*/
312-
if (request.firmware_tag[GB_FIRMWARE_TAG_MAX_SIZE - 1] != '\0') {
310+
if (ret == -E2BIG) {
313311
dev_err(fw_mgmt->parent, "backend-update: firmware-tag is not NULL terminated\n");
314312
return -EINVAL;
315313
}

drivers/staging/greybus/light.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ static int __gb_lights_flash_brightness_set(struct gb_channel *channel)
142142
channel = get_channel_from_mode(channel->light,
143143
GB_CHANNEL_MODE_TORCH);
144144

145+
if (!channel)
146+
return -EINVAL;
147+
145148
/* For not flash we need to convert brightness to intensity */
146149
intensity = channel->intensity_uA.min +
147150
(channel->intensity_uA.step * channel->led->brightness);
@@ -528,7 +531,10 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
528531
}
529532

530533
channel_flash = get_channel_from_mode(light, GB_CHANNEL_MODE_FLASH);
531-
WARN_ON(!channel_flash);
534+
if (!channel_flash) {
535+
dev_err(dev, "failed to get flash channel from mode\n");
536+
return -EINVAL;
537+
}
532538

533539
fled = &channel_flash->fled;
534540

drivers/staging/greybus/loopback.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ struct gb_loopback {
101101
static struct class loopback_class = {
102102
.name = "gb_loopback",
103103
};
104+
104105
static DEFINE_IDA(loopback_ida);
105106

106107
/* Min/max values in jiffies */

drivers/staging/ks7010/ks7010_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ static struct sdio_driver ks7010_sdio_driver = {
11361136
.remove = ks7010_sdio_remove,
11371137
};
11381138

1139-
module_driver(ks7010_sdio_driver, sdio_register_driver, sdio_unregister_driver);
1139+
module_sdio_driver(ks7010_sdio_driver);
11401140
MODULE_AUTHOR("Sang Engineering, Qi-Hardware, KeyStream");
11411141
MODULE_DESCRIPTION("Driver for KeyStream KS7010 based SDIO cards");
11421142
MODULE_LICENSE("GPL v2");

drivers/staging/nvec/TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ToDo list (incomplete, unordered)
22
- move the driver to the new i2c slave framework
33
- finish suspend/resume support
4-
- fix udelay in the isr
54
- add atomic ops in order to fix shutoff/reboot problems

0 commit comments

Comments
 (0)