You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cc1101-driver/0002-Fix-build-errors-for-6...

57 lines
1.9 KiB

From 0de2cb135aed20f3e706c3502d4cc9597debbda7 Mon Sep 17 00:00:00 2001
From: itycodes <tranquillitycodes@proton.me>
Date: Thu, 12 Jun 2025 02:03:17 +0200
Subject: [PATCH 2/4] Fix build errors for 6.10
---
cc1101_chrdev.c | 4 ++--
cc1101_main.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cc1101_chrdev.c b/cc1101_chrdev.c
index 21779b0..9a0bc69 100644
--- a/cc1101_chrdev.c
+++ b/cc1101_chrdev.c
@@ -378,7 +378,7 @@ int cc1101_chrdev_add_device(cc1101_t * cc1101) {
cc1101->devt = MKDEV(SPI_MAJOR_NUMBER, device_index);
// Create a /dev/cc1101.x.x character device
- if(IS_ERR(device_create(dev_class, &cc1101->spi->dev, cc1101->devt, cc1101, "cc1101.%d.%d", cc1101->spi->master->bus_num, cc1101->spi->chip_select))) {
+ if(IS_ERR(device_create(dev_class, &cc1101->spi->dev, cc1101->devt, cc1101, "cc1101.%d.%s", cc1101->spi->controller->bus_num, cc1101->spi->chip_select))) {
ret = -ENODEV;
goto done;
}
@@ -432,7 +432,7 @@ int cc1101_chrdev_setup(struct spi_driver* cc1101_driver)
goto err_register;
}
- dev_class = class_create(THIS_MODULE, "cc1101");
+ dev_class = class_create("cc1101");
if (IS_ERR(dev_class)) {
ret = PTR_ERR(dev_class);
goto err_class_create;
diff --git a/cc1101_main.c b/cc1101_main.c
index fde434c..8bc340f 100755
--- a/cc1101_main.c
+++ b/cc1101_main.c
@@ -117,7 +117,7 @@ static int cc1101_spi_probe(struct spi_device *spi)
/*
* Function called on module removal for each CC1101 entry in device tree
*/
-static int cc1101_spi_remove(struct spi_device *spi)
+static void cc1101_spi_remove(struct spi_device *spi)
{
cc1101_t* cc1101;
cc1101 = spi_get_drvdata(spi);
@@ -131,7 +131,6 @@ static int cc1101_spi_remove(struct spi_device *spi)
// Remove /dev/cc1101.x.x
cc1101_chrdev_remove_device(cc1101);
CC1101_INFO(cc1101, "Removed");
- return 0;
}
/*
--
2.49.0