Commit 59697e06 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents c6006b8c b76029bd
Loading
Loading
Loading
Loading
+19 −18
Original line number Diff line number Diff line
@@ -107,6 +107,8 @@
static long read_timeout = 1000; /* ms to wait before read() times out */
static long write_timeout = 1000; /* ms to wait before write() times out */

static DEFINE_IDA(axis_fifo_ida);

/* ----------------------------
 * module command-line arguments
 * ----------------------------
@@ -123,6 +125,7 @@ MODULE_PARM_DESC(write_timeout, "ms to wait before blocking write() timing out;
 */

struct axis_fifo {
	int id;
	int irq; /* interrupt */
	void __iomem *base_addr; /* kernel space memory */

@@ -693,17 +696,11 @@ static int axis_fifo_probe(struct platform_device *pdev)

	/* get iospace for the device and request physical memory */
	fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
	if (IS_ERR(fifo->base_addr)) {
		rc = PTR_ERR(fifo->base_addr);
		goto err_initial;
	}
	if (IS_ERR(fifo->base_addr))
		return PTR_ERR(fifo->base_addr);

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

	/* create unique device name */
	snprintf(device_name, 32, "%s_%pa", DRIVER_NAME, &r_mem->start);
	dev_dbg(fifo->dt_device, "device name [%s]\n", device_name);

	/* ----------------------------
	 *          init IP
	 * ----------------------------
@@ -711,7 +708,7 @@ static int axis_fifo_probe(struct platform_device *pdev)

	rc = axis_fifo_parse_dt(fifo);
	if (rc)
		goto err_initial;
		return rc;

	reset_ip_core(fifo);

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

	/* request IRQ */
	fifo->irq = rc;
@@ -732,13 +729,18 @@ static int axis_fifo_probe(struct platform_device *pdev)
	if (rc) {
		dev_err(fifo->dt_device, "couldn't allocate interrupt %i\n",
			fifo->irq);
		goto err_initial;
		return rc;
	}

	/* ----------------------------
	 *      init char device
	 * ----------------------------
	 */
	fifo->id = ida_alloc(&axis_fifo_ida, GFP_KERNEL);
	if (fifo->id < 0)
		return fifo->id;

	snprintf(device_name, 32, "%s%d", DRIVER_NAME, fifo->id);

	/* create character device */
	fifo->miscdev.fops = &fops;
@@ -746,16 +748,14 @@ static int axis_fifo_probe(struct platform_device *pdev)
	fifo->miscdev.name = device_name;
	fifo->miscdev.parent = dev;
	rc = misc_register(&fifo->miscdev);
	if (rc < 0)
		goto err_initial;
	if (rc < 0) {
		ida_free(&axis_fifo_ida, fifo->id);
		return rc;
	}

	axis_fifo_debugfs_init(fifo);

	return 0;

err_initial:
	dev_set_drvdata(dev, NULL);
	return rc;
}

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

	debugfs_remove(fifo->debugfs_dir);
	misc_deregister(&fifo->miscdev);
	dev_set_drvdata(dev, NULL);
	ida_free(&axis_fifo_ida, fifo->id);
}

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

module_exit(axis_fifo_exit);
+8 −8
Original line number Diff line number Diff line
@@ -277,8 +277,8 @@ struct bb_priv {
	int ndac_mode;	     /* nrfd interrupt mode 0/1 -> edge/levels */
	int dav_tx;	     /* keep trace of DAV status while sending */
	int dav_rx;	     /* keep trace of DAV status while receiving */
	u8 eos;	     // eos character
	short eos_flags;     // eos mode
	u8 eos;              /* eos character */
	short eos_flags;     /* eos mode */
	short eos_check;     /* eos check required in current operation ... */
	short eos_check_8;   /* ... with byte comparison */
	short eos_mask_7;    /* ... with 7 bit masked character */
@@ -297,7 +297,7 @@ struct bb_priv {
	size_t w_cnt;
	size_t length;
	u8 *w_buf;
	spinlock_t rw_lock; // protect mods to rw_lock
	spinlock_t rw_lock;   /* protect mods to rw_lock */
	int phase;
	int ndac_idle;
	int ndac_seq;
@@ -726,7 +726,7 @@ static irqreturn_t bb_SRQ_interrupt(int irq, void *arg)
static int bb_command(struct gpib_board *board, u8 *buffer,
		      size_t length, size_t *bytes_written)
{
	size_t ret;
	int ret;
	struct bb_priv *priv = board->private_data;
	int i;

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

	gpiod_direction_output(NRFD, 0);  // hold off the talker
	gpiod_direction_output(NDAC, 0);  // data not accepted
	gpiod_direction_output(NRFD, 0); /* hold off the talker */
	gpiod_direction_output(NDAC, 0); /* data not accepted */

	priv->direction = DIR_READ;
}
+2 −1
Original line number Diff line number Diff line
@@ -273,7 +273,8 @@ struct gpib_board {
	struct mutex big_gpib_mutex;
	/* pid of last process to lock the board mutex */
	pid_t locking_pid;
	spinlock_t locking_pid_spinlock; // lock for setting locking pid
	/* lock for setting locking pid */
	spinlock_t locking_pid_spinlock;
	/* Spin lock for dealing with races with the interrupt handler */
	spinlock_t spinlock;
	/* Watchdog timer to enable timeouts */
+13 −13
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ struct nec7210_priv {
	u8 auxb_bits;			// bits written to auxiliary register B
	// used to keep track of board's state, bit definitions given below
	unsigned long state;
	/* lock for chips that extend the nec7210 registers by paging in alternate regs */
	// lock for chips that extend the nec7210 registers by paging in alternate regs
	spinlock_t register_page_lock;
	// wrappers for outb, inb, readb, or writeb
	u8 (*read_byte)(struct nec7210_priv *priv, unsigned int register_number);
+45 −45
Original line number Diff line number Diff line
@@ -150,8 +150,8 @@ enum {
	IMR0 = 0,	/* interrupt mask 0          */
	IMR1 = 1,	/* interrupt mask 1          */
	AUXCR = 3,	/* auxiliary command         */
	ADR = 4,	// address register
	SPMR = 5,	// serial poll mode register
	ADR = 4,	/* address register	     */
	SPMR = 5,	/* serial poll mode register */
	PPR = 6,	/* parallel poll             */
	CDOR = 7,	/* data out register         */
};
@@ -250,8 +250,8 @@ enum bus_status_bits {
enum aux_cmd_bits {
	AUX_CS = 0x80,			/* set bit instead of clearing it, used with commands marked 'd' below */
	AUX_CHIP_RESET = 0x0,		/* d Chip reset                   */
	AUX_INVAL = 0x1,	// release dac holdoff, invalid command byte
	AUX_VAL = (AUX_INVAL | AUX_CS),	// release dac holdoff, valid command byte
	AUX_INVAL = 0x1,		/* release dac holdoff, invalid command byte */
	AUX_VAL = (AUX_INVAL | AUX_CS),	/* release dac holdoff, valid command byte   */
	AUX_RHDF = 0x2,			/* X Release RFD holdoff          */
	AUX_HLDA = 0x3,			/* d holdoff on all data          */
	AUX_HLDE = 0x4,			/* d holdoff on EOI only          */
Loading