mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
spi: spidev-rkslv: Fix compiler error
Change-Id: Ie6e3d11b43b557fcfd7e5f1a412a32ff00d84068 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -442,11 +442,11 @@ static ssize_t spidev_rkmst_misc_write(struct file *filp, const char __user *buf
|
||||
if (!tempbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
prandom_bytes(tempbuf, len);
|
||||
get_random_bytes(tempbuf, len);
|
||||
spidev_rkmst_xfer(spidev, tempbuf, NULL, addr, len);
|
||||
start_time = ktime_get();
|
||||
for (i = 0; i < loops; i++) {
|
||||
prandom_bytes(spidev->txbuf, len);
|
||||
get_random_bytes(spidev->txbuf, len);
|
||||
spidev_rkmst_xfer(spidev, spidev->txbuf, spidev->rxbuf, addr, len);
|
||||
if (memcmp(spidev->rxbuf, tempbuf, len)) {
|
||||
dev_err(&spi->dev, "dulplex autotest failed, loops=%d\n", i);
|
||||
@@ -487,7 +487,7 @@ static ssize_t spidev_rkmst_misc_write(struct file *filp, const char __user *buf
|
||||
|
||||
start_time = ktime_get();
|
||||
for (i = 0; i < loops; i++) {
|
||||
prandom_bytes(spidev->txbuf, len);
|
||||
get_random_bytes(spidev->txbuf, len);
|
||||
spidev_rkmst_xfer(spidev, spidev->txbuf, NULL, addr, len);
|
||||
spidev_rkmst_xfer(spidev, NULL, spidev->rxbuf, addr, len);
|
||||
if (memcmp(spidev->rxbuf, spidev->txbuf, len)) {
|
||||
@@ -601,13 +601,11 @@ static int spidev_rkmst_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spidev_rkmst_remove(struct spi_device *spi)
|
||||
static void spidev_rkmst_remove(struct spi_device *spi)
|
||||
{
|
||||
struct spidev_rkmst_data *spidev = dev_get_drvdata(&spi->dev);
|
||||
|
||||
misc_deregister(&spidev->misc_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
@@ -108,6 +108,7 @@ static int spidev_slv_write_and_read(struct spidev_rkslv_data *spidev, const voi
|
||||
.tx_buf = tx_buf,
|
||||
.rx_buf = rx_buf,
|
||||
.len = len,
|
||||
.bits_per_word = bit_per_word,
|
||||
};
|
||||
struct spi_message m;
|
||||
int ret;
|
||||
@@ -375,7 +376,7 @@ static int spidev_rkslv_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spidev_rkslv_remove(struct spi_device *spi)
|
||||
static void spidev_rkslv_remove(struct spi_device *spi)
|
||||
{
|
||||
struct spidev_rkslv_data *spidev = dev_get_drvdata(&spi->dev);
|
||||
|
||||
@@ -383,8 +384,6 @@ static int spidev_rkslv_remove(struct spi_device *spi)
|
||||
spi_slave_abort(spi);
|
||||
kthread_stop(spidev->tsk);
|
||||
misc_deregister(&spidev->misc_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
Reference in New Issue
Block a user