Skip to content

Commit a08381e

Browse files
committed
drivers: vision: Fix compatibility with 6.1 kernel
1 parent c248191 commit a08381e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

drivers/vision/aiy-vision.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
*/
2121

2222
#include "aiy-vision.h"
23-
#include <asm/uaccess.h>
2423
#include <linux/atomic.h>
2524
#include <linux/cdev.h>
2625
#include <linux/crc32.h>
@@ -1279,11 +1278,6 @@ static int visionbonnet_probe(struct spi_device *spi) {
12791278

12801279
dev_notice(&spi->dev, "Initializing\n");
12811280

1282-
if (!spi_busnum_to_master(0)) {
1283-
dev_err(&spi->dev, "No spi master found\n");
1284-
return -ENODEV;
1285-
}
1286-
12871281
bonnet = devm_kzalloc(&spi->dev, sizeof(*bonnet), GFP_KERNEL);
12881282
if (!bonnet) {
12891283
dev_err(&spi->dev, "Out of memory\n");
@@ -1373,7 +1367,7 @@ static int visionbonnet_probe(struct spi_device *spi) {
13731367
// This facilitates large transfers with a single toggling of CS, to
13741368
// make things like booting the bonnet happy.
13751369
spi->mode |= SPI_NO_CS;
1376-
spi->cs_gpio = -1;
1370+
spi->cs_gpiod = NULL;
13771371
ret = visionbonnet_set_spi_freq(bonnet, SPI_NORMAL_FREQ);
13781372
if (ret) {
13791373
dev_err(&spi->dev, "spi_setup failed: %d\n", ret);
@@ -1395,15 +1389,14 @@ static int visionbonnet_probe(struct spi_device *spi) {
13951389
return ret;
13961390
}
13971391

1398-
static int visionbonnet_remove(struct spi_device *spi) {
1392+
static void visionbonnet_remove(struct spi_device *spi) {
13991393
visionbonnet_t *bonnet = spi->dev.platform_data;
14001394
mutex_lock(&bonnet->lock);
14011395
visionbonnet_cancel_transactions(bonnet);
14021396
mutex_unlock(&bonnet->lock);
14031397
drain_workqueue(bonnet->workqueue);
14041398

14051399
visionbonnet_destroy(bonnet);
1406-
return 0;
14071400
}
14081401

14091402
static const struct of_device_id visionbonnet_of_match[] = {

drivers/vision/debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
aiy-vision-dkms (1.2-1.1) stable; urgency=medium
2+
3+
* Non-maintainer upload.
4+
* Fix compatibility with 6.1 kernel.
5+
6+
-- Gunjan Gupta <viraniac@gmail.com> Mon, 13 Mar 2023 01:47:00 -0530
7+
18
aiy-vision-dkms (1.2-1) stable; urgency=medium
29

310
* Proper order of cleanup calls in visionbonnet_destroy().

0 commit comments

Comments
 (0)