Skip to content

Commit 59697e0

Browse files
committed
Merge tag 'staging-6.18-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.18-rc1. Nothing really exciting in here they pretty much consist of: - minor coding style changes and cleanups - some api layer removals where not needed Overall a quiet development cycle. All have been in linux-next for a while with no reported issues" * tag 'staging-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (63 commits) staging: rtl8723bs: xmit: rephrase comment and drop extra space staging: sm750fb: rename camel case variable staging: rtl8723bs: hal: put return type and function name on one line staging: rtl8723bs: fix typo in comment staging: sm750fb: rename snake case variables staging: sm750fb: remove unnecessary volatile qualifiers staging: rtl8723bs: rtw_efuse.h: simplify copyright banner staging: rtl8723bs: remove unused tables staging: rtl8723bs: Hal_EfuseParseAntennaDiversity_8723B is empty staging: rtl8723bs: remove REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723 staging: rtl8723bs: remove bWrite from Hal_EfusePowerSwitch staging: rtl8723bs: remove wrapper Efuse_PowerSwitch staging: octeon: Clean up dead code in ethernet-tx.c staging: rtl8723bs: fix fortify warnings by using struct_group staging: gpib: use int type to store negative error codes staging: rtl8723bs: remove include/recv_osdep.h staging: rtl8723bs: remove os_dep/recv_linux.c staging: rtl8723bs: rename rtw_os_recv_indicate_pkt staging: rtl8723bs: move rtw_os_recv_indicate_pkt to rtw_recv.c staging: rtl8723bs: rename rtw_os_alloc_msdu_pkt ...
2 parents c6006b8 + b76029b commit 59697e0

Some content is hidden

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

67 files changed

+857
-1685
lines changed

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
static long read_timeout = 1000; /* ms to wait before read() times out */
108108
static long write_timeout = 1000; /* ms to wait before write() times out */
109109

110+
static DEFINE_IDA(axis_fifo_ida);
111+
110112
/* ----------------------------
111113
* module command-line arguments
112114
* ----------------------------
@@ -123,6 +125,7 @@ MODULE_PARM_DESC(write_timeout, "ms to wait before blocking write() timing out;
123125
*/
124126

125127
struct axis_fifo {
128+
int id;
126129
int irq; /* interrupt */
127130
void __iomem *base_addr; /* kernel space memory */
128131

@@ -693,25 +696,19 @@ static int axis_fifo_probe(struct platform_device *pdev)
693696

694697
/* get iospace for the device and request physical memory */
695698
fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
696-
if (IS_ERR(fifo->base_addr)) {
697-
rc = PTR_ERR(fifo->base_addr);
698-
goto err_initial;
699-
}
699+
if (IS_ERR(fifo->base_addr))
700+
return PTR_ERR(fifo->base_addr);
700701

701702
dev_dbg(fifo->dt_device, "remapped memory to 0x%p\n", fifo->base_addr);
702703

703-
/* create unique device name */
704-
snprintf(device_name, 32, "%s_%pa", DRIVER_NAME, &r_mem->start);
705-
dev_dbg(fifo->dt_device, "device name [%s]\n", device_name);
706-
707704
/* ----------------------------
708705
* init IP
709706
* ----------------------------
710707
*/
711708

712709
rc = axis_fifo_parse_dt(fifo);
713710
if (rc)
714-
goto err_initial;
711+
return rc;
715712

716713
reset_ip_core(fifo);
717714

@@ -723,7 +720,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
723720
/* get IRQ resource */
724721
rc = platform_get_irq(pdev, 0);
725722
if (rc < 0)
726-
goto err_initial;
723+
return rc;
727724

728725
/* request IRQ */
729726
fifo->irq = rc;
@@ -732,30 +729,33 @@ static int axis_fifo_probe(struct platform_device *pdev)
732729
if (rc) {
733730
dev_err(fifo->dt_device, "couldn't allocate interrupt %i\n",
734731
fifo->irq);
735-
goto err_initial;
732+
return rc;
736733
}
737734

738735
/* ----------------------------
739736
* init char device
740737
* ----------------------------
741738
*/
739+
fifo->id = ida_alloc(&axis_fifo_ida, GFP_KERNEL);
740+
if (fifo->id < 0)
741+
return fifo->id;
742+
743+
snprintf(device_name, 32, "%s%d", DRIVER_NAME, fifo->id);
742744

743745
/* create character device */
744746
fifo->miscdev.fops = &fops;
745747
fifo->miscdev.minor = MISC_DYNAMIC_MINOR;
746748
fifo->miscdev.name = device_name;
747749
fifo->miscdev.parent = dev;
748750
rc = misc_register(&fifo->miscdev);
749-
if (rc < 0)
750-
goto err_initial;
751+
if (rc < 0) {
752+
ida_free(&axis_fifo_ida, fifo->id);
753+
return rc;
754+
}
751755

752756
axis_fifo_debugfs_init(fifo);
753757

754758
return 0;
755-
756-
err_initial:
757-
dev_set_drvdata(dev, NULL);
758-
return rc;
759759
}
760760

761761
static void axis_fifo_remove(struct platform_device *pdev)
@@ -765,7 +765,7 @@ static void axis_fifo_remove(struct platform_device *pdev)
765765

766766
debugfs_remove(fifo->debugfs_dir);
767767
misc_deregister(&fifo->miscdev);
768-
dev_set_drvdata(dev, NULL);
768+
ida_free(&axis_fifo_ida, fifo->id);
769769
}
770770

771771
static const struct of_device_id axis_fifo_of_match[] = {
@@ -805,6 +805,7 @@ module_init(axis_fifo_init);
805805
static void __exit axis_fifo_exit(void)
806806
{
807807
platform_driver_unregister(&axis_fifo_driver);
808+
ida_destroy(&axis_fifo_ida);
808809
}
809810

810811
module_exit(axis_fifo_exit);

drivers/staging/gpib/agilent_82357a/agilent_82357a.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ static int agilent_82357a_read(struct gpib_board *board, u8 *buffer, size_t leng
449449
if (!out_data)
450450
return -ENOMEM;
451451
out_data[i++] = DATA_PIPE_CMD_READ;
452-
out_data[i++] = 0; //primary address when ARF_NO_ADDR is not set
453-
out_data[i++] = 0; //secondary address when ARF_NO_ADDR is not set
452+
out_data[i++] = 0; // primary address when ARF_NO_ADDR is not set
453+
out_data[i++] = 0; // secondary address when ARF_NO_ADDR is not set
454454
out_data[i] = ARF_NO_ADDRESS | ARF_END_ON_EOI;
455455
if (a_priv->eos_mode & REOS)
456456
out_data[i] |= ARF_END_ON_EOS_CHAR;
@@ -532,7 +532,7 @@ static int agilent_82357a_read(struct gpib_board *board, u8 *buffer, size_t leng
532532
*/
533533
agilent_82357a_take_control_internal(board, 0);
534534

535-
//FIXME check trailing flags for error
535+
// FIXME check trailing flags for error
536536
return retval;
537537
}
538538

@@ -966,7 +966,7 @@ static int agilent_82357a_parallel_poll(struct gpib_board *board, u8 *result)
966966
dev_err(&usb_dev->dev, "write_registers() returned error\n");
967967
return retval;
968968
}
969-
udelay(2); //silly, since usb write will take way longer
969+
udelay(2); // silly, since usb write will take way longer
970970
read.address = CPTR;
971971
retval = agilent_82357a_read_registers(a_priv, &read, 1, 1);
972972
if (retval) {
@@ -989,31 +989,31 @@ static int agilent_82357a_parallel_poll(struct gpib_board *board, u8 *result)
989989

990990
static void agilent_82357a_parallel_poll_configure(struct gpib_board *board, u8 config)
991991
{
992-
//board can only be system controller
992+
// board can only be system controller
993993
return;// 0;
994994
}
995995

996996
static void agilent_82357a_parallel_poll_response(struct gpib_board *board, int ist)
997997
{
998-
//board can only be system controller
998+
// board can only be system controller
999999
return;// 0;
10001000
}
10011001

10021002
static void agilent_82357a_serial_poll_response(struct gpib_board *board, u8 status)
10031003
{
1004-
//board can only be system controller
1004+
// board can only be system controller
10051005
return;// 0;
10061006
}
10071007

10081008
static u8 agilent_82357a_serial_poll_status(struct gpib_board *board)
10091009
{
1010-
//board can only be system controller
1010+
// board can only be system controller
10111011
return 0;
10121012
}
10131013

10141014
static void agilent_82357a_return_to_local(struct gpib_board *board)
10151015
{
1016-
//board can only be system controller
1016+
// board can only be system controller
10171017
return;// 0;
10181018
}
10191019

drivers/staging/gpib/agilent_82357a/agilent_82357a.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum usb_vendor_ids {
2020
enum usb_device_ids {
2121
USB_DEVICE_ID_AGILENT_82357A = 0x0107,
2222
USB_DEVICE_ID_AGILENT_82357A_PREINIT = 0x0007, // device id before firmware is loaded
23-
USB_DEVICE_ID_AGILENT_82357B = 0x0718, // device id before firmware is loaded
23+
USB_DEVICE_ID_AGILENT_82357B = 0x0718, // device id before firmware is loaded
2424
USB_DEVICE_ID_AGILENT_82357B_PREINIT = 0x0518, // device id before firmware is loaded
2525
};
2626

@@ -129,10 +129,10 @@ struct agilent_82357a_priv {
129129
struct urb *bulk_urb;
130130
struct urb *interrupt_urb;
131131
u8 *interrupt_buffer;
132-
struct mutex bulk_transfer_lock; // bulk transfer lock
133-
struct mutex bulk_alloc_lock; // bulk transfer allocation lock
134-
struct mutex interrupt_alloc_lock; // interrupt allocation lock
135-
struct mutex control_alloc_lock; // control message allocation lock
132+
struct mutex bulk_transfer_lock; // bulk transfer lock
133+
struct mutex bulk_alloc_lock; // bulk transfer allocation lock
134+
struct mutex interrupt_alloc_lock; // interrupt allocation lock
135+
struct mutex control_alloc_lock; // control message allocation lock
136136
struct timer_list bulk_timer;
137137
struct agilent_82357a_urb_ctx context;
138138
unsigned int bulk_out_endpoint;

drivers/staging/gpib/cb7210/cb7210.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ enum cb7210_page_in {
5656
};
5757

5858
enum hs_regs {
59-
//write registers
59+
// write registers
6060
HS_MODE = 0x8, /* HS_MODE register */
6161
HS_INT_LEVEL = 0x9, /* HS_INT_LEVEL register */
62-
//read registers
62+
// read registers
6363
HS_STATUS = 0x8, /* HS_STATUS register */
6464
};
6565

drivers/staging/gpib/cec/cec_gpib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static struct gpib_interface cec_pci_interface = {
206206
.parallel_poll_configure = cec_parallel_poll_configure,
207207
.parallel_poll_response = cec_parallel_poll_response,
208208
.local_parallel_poll_mode = NULL, // XXX
209-
.line_status = NULL, //XXX
209+
.line_status = NULL, // XXX
210210
.update_status = cec_update_status,
211211
.primary_address = cec_primary_address,
212212
.secondary_address = cec_secondary_address,

drivers/staging/gpib/common/gpib_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static int setup_serial_poll(struct gpib_board *board, unsigned int usec_timeout
326326
cmd_string[i++] = MLA(board->pad); /* controller's listen address */
327327
if (board->sad >= 0)
328328
cmd_string[i++] = MSA(board->sad);
329-
cmd_string[i++] = SPE; //serial poll enable
329+
cmd_string[i++] = SPE; // serial poll enable
330330

331331
ret = board->interface->command(board, cmd_string, i, &bytes_written);
332332
if (ret < 0 || bytes_written < i) {

drivers/staging/gpib/common/iblib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ static int wait_satisfied(struct wait_info *winfo, struct gpib_status_queue *sta
608608
*status = temp_status;
609609
return 1;
610610
}
611-
//XXX does wait for END work?
611+
// XXX does wait for END work?
612612
return 0;
613613
}
614614

drivers/staging/gpib/eastwood/fluke_gpib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int fluke_accel_write(struct gpib_board *board, u8 *buffer, size_t length
507507
}
508508
if (retval < 0)
509509
return retval;
510-
//handle sending of last byte with eoi
510+
// handle sending of last byte with eoi
511511
if (send_eoi) {
512512
size_t num_bytes;
513513

drivers/staging/gpib/fmh_gpib/fmh_gpib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static int fmh_gpib_accel_write(struct gpib_board *board, u8 *buffer,
523523
}
524524
if (retval < 0)
525525
return retval;
526-
//handle sending of last byte with eoi
526+
// handle sending of last byte with eoi
527527
if (send_eoi) {
528528
size_t num_bytes;
529529

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ struct bb_priv {
277277
int ndac_mode; /* nrfd interrupt mode 0/1 -> edge/levels */
278278
int dav_tx; /* keep trace of DAV status while sending */
279279
int dav_rx; /* keep trace of DAV status while receiving */
280-
u8 eos; // eos character
281-
short eos_flags; // eos mode
280+
u8 eos; /* eos character */
281+
short eos_flags; /* eos mode */
282282
short eos_check; /* eos check required in current operation ... */
283283
short eos_check_8; /* ... with byte comparison */
284284
short eos_mask_7; /* ... with 7 bit masked character */
@@ -290,14 +290,14 @@ struct bb_priv {
290290
u8 *rbuf;
291291
u8 *wbuf;
292292
int end_flag;
293-
int r_busy; /* 0==idle 1==busy */
293+
int r_busy; /* 0==idle 1==busy */
294294
int w_busy;
295295
int write_done;
296-
int cmd; /* 1 = cmd write in progress */
296+
int cmd; /* 1 = cmd write in progress */
297297
size_t w_cnt;
298298
size_t length;
299299
u8 *w_buf;
300-
spinlock_t rw_lock; // protect mods to rw_lock
300+
spinlock_t rw_lock; /* protect mods to rw_lock */
301301
int phase;
302302
int ndac_idle;
303303
int ndac_seq;
@@ -726,7 +726,7 @@ static irqreturn_t bb_SRQ_interrupt(int irq, void *arg)
726726
static int bb_command(struct gpib_board *board, u8 *buffer,
727727
size_t length, size_t *bytes_written)
728728
{
729-
size_t ret;
729+
int ret;
730730
struct bb_priv *priv = board->private_data;
731731
int i;
732732

@@ -1462,8 +1462,8 @@ static inline void SET_DIR_READ(struct bb_priv *priv)
14621462
gpiod_set_value(TE, 0); /* set NDAC and NRFD to transmit and DAV to receive */
14631463
}
14641464

1465-
gpiod_direction_output(NRFD, 0); // hold off the talker
1466-
gpiod_direction_output(NDAC, 0); // data not accepted
1465+
gpiod_direction_output(NRFD, 0); /* hold off the talker */
1466+
gpiod_direction_output(NDAC, 0); /* data not accepted */
14671467

14681468
priv->direction = DIR_READ;
14691469
}

0 commit comments

Comments
 (0)