Open johnineasttexas opened 5 months ago
change the function cc1101_spi_remove in file cc1101_main.c for this one:
static void cc1101_spi_remove(struct spi_device *spi)
{
cc1101_t* cc1101;
cc1101 = spi_get_drvdata(spi);
// Remove the RX timeout timer
del_timer(&cc1101->rx_timeout);
// Reset the hardware, placing it in idle mode
cc1101_reset(cc1101);
// Remove /dev/cc1101.x.x
cc1101_chrdev_remove_device(cc1101);
CC1101_INFO(cc1101, "Removed");
}
I've run into this too. Is this kernel version dependent (we're on 6.1) or gcc version dependent (we are on gcc 13)?
Another required change for compiling for kernel 6.6 (rpi default for a while now):
diff --git a/cc1101_chrdev.c b/cc1101_chrdev.c
index 489c569..9516fee 100644
--- a/cc1101_chrdev.c
+++ b/cc1101_chrdev.c
@@ -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");^M
if (IS_ERR(dev_class)) {
ret = PTR_ERR(dev_class);
goto err_class_create;
@@ -462,4 +462,4 @@ void cc1101_chrdev_teardown(struct spi_driver* cc1101_driver)
spi_unregister_driver(cc1101_driver);
class_destroy(dev_class);
unregister_chrdev(SPI_MAJOR_NUMBER, cc1101_driver->driver.name);
-}
\ No newline at end of file
+}^M
This seems to be the same issue that danucu was having
Neither: sudo dkms build -m cc1101 -v 1.4.0
nor: sudo dkms build -m cc1101 -v 1.3.3
work - the make.log that I get for them are:
and: