Commit 067dd587 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging driver fixes from Greg KH:
 "Here are three small staging driver fixes for 6.15-rc6. These are:

   - bcm2835-camera driver fix

   - two axis-fifo driver fixes

  All of these have been in linux-next for a few weeks with no reported
  issues"

* tag 'staging-6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: axis-fifo: Remove hardware resets for user errors
  staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
  staging: bcm2835-camera: Initialise dev in v4l2_dev
parents 914a1fe5 c6e8d85f
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -393,16 +393,14 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,

	bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET);
	if (!bytes_available) {
		dev_err(fifo->dt_device, "received a packet of length 0 - fifo core will be reset\n");
		reset_ip_core(fifo);
		dev_err(fifo->dt_device, "received a packet of length 0\n");
		ret = -EIO;
		goto end_unlock;
	}

	if (bytes_available > len) {
		dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu) - fifo core will be reset\n",
		dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n",
			bytes_available, len);
		reset_ip_core(fifo);
		ret = -EINVAL;
		goto end_unlock;
	}
@@ -411,8 +409,7 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
		/* this probably can't happen unless IP
		 * registers were previously mishandled
		 */
		dev_err(fifo->dt_device, "received a packet that isn't word-aligned - fifo core will be reset\n");
		reset_ip_core(fifo);
		dev_err(fifo->dt_device, "received a packet that isn't word-aligned\n");
		ret = -EIO;
		goto end_unlock;
	}
@@ -433,7 +430,6 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,

		if (copy_to_user(buf + copied * sizeof(u32), tmp_buf,
				 copy * sizeof(u32))) {
			reset_ip_core(fifo);
			ret = -EFAULT;
			goto end_unlock;
		}
@@ -542,7 +538,6 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,

		if (copy_from_user(tmp_buf, buf + copied * sizeof(u32),
				   copy * sizeof(u32))) {
			reset_ip_core(fifo);
			ret = -EFAULT;
			goto end_unlock;
		}
@@ -775,9 +770,6 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
		goto end;
	}

	/* IP sets TDFV to fifo depth - 4 so we will do the same */
	fifo->tx_fifo_depth -= 4;

	ret = get_dts_property(fifo, "xlnx,use-rx-data", &fifo->has_rx_fifo);
	if (ret) {
		dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n");
+1 −0
Original line number Diff line number Diff line
@@ -1900,6 +1900,7 @@ static int bcm2835_mmal_probe(struct vchiq_device *device)
				__func__, ret);
			goto free_dev;
		}
		dev->v4l2_dev.dev = &device->dev;

		/* setup v4l controls */
		ret = bcm2835_mmal_init_controls(dev, &dev->ctrl_handler);