Skip to content

Commit 87bbc2c

Browse files
committed
削除されたマクロ"spi_master"を"spi_controller"に置き換え
1 parent 484796e commit 87bbc2c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/drivers/rtmouse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
// Raspberry Pi 2 B : 2
5353
// Raspberry Pi 3 B/A+/B+ : 2
5454
// Raspberry Pi 4 B : 4
55-
#define RASPBERRYPI 2
55+
#define RASPBERRYPI 4
5656

5757
#define DEV_RIGHT 0
5858
#define DEV_LEFT 1

src/drivers/rtmouse_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static unsigned int mcp3204_get_value(int channel)
189189
dev = mcp320x_dev;
190190

191191
#else
192-
struct spi_master *master;
192+
struct spi_controller *controller;
193193
master = spi_busnum_to_master(mcp3204_info.bus_num);
194194
snprintf(str, sizeof(str), "%s.%u", dev_name(&master->dev),
195195
mcp3204_info.chip_select);

src/drivers/rtmouse_spi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int mcp3204_probe(struct spi_device *spi)
148148
* spi_remove_device - remove SPI device
149149
* called by mcp3204_init() and mcp3204_exit()
150150
*/
151-
static void spi_remove_device(struct spi_master *master, unsigned int cs)
151+
static void spi_remove_device(struct spi_controller *master, unsigned int cs)
152152
{
153153
struct device *dev;
154154
char str[128];
@@ -188,7 +188,7 @@ int mcp3204_init(void)
188188
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
189189
bus_for_each_dev(&spi_bus_type, NULL, NULL, __callback_find_mcp3204);
190190
#else
191-
struct spi_master *master;
191+
struct spi_controller *master;
192192
struct spi_device *spi_device;
193193

194194
spi_register_driver(&mcp3204_driver);
@@ -231,7 +231,7 @@ void mcp3204_exit(void)
231231
mcp3204_remove(to_spi_device(mcp320x_dev));
232232
}
233233
#else
234-
struct spi_master *master;
234+
struct spi_controller *master;
235235
master = spi_busnum_to_master(mcp3204_info.bus_num);
236236

237237
if (master) {

0 commit comments

Comments
 (0)