From 197d784bf3167062ddaa273cf24aeea745fbaed6 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Sat, 7 Apr 2018 22:21:06 +0000 Subject: [PATCH] Cast the data pointer to the correct type for the data being accessed (as opposed to one that accidentally worked on the one arch I test-compiled for on my first try). Reported by: np@, O. Hartmann Pointy hat: ian@ --- sys/dev/spibus/spigen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/spibus/spigen.c b/sys/dev/spibus/spigen.c index 9283474b5fa..fd3dd3bec62 100644 --- a/sys/dev/spibus/spigen.c +++ b/sys/dev/spibus/spigen.c @@ -324,13 +324,13 @@ spigen_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, error = spigen_transfer_mmapped(cdev, (struct spigen_transfer_mmapped *)data); break; case SPIGENIOC_GET_CLOCK_SPEED: - error = spibus_get_clock(dev, (uintptr_t *)data); + error = spibus_get_clock(dev, (uint32_t *)data); break; case SPIGENIOC_SET_CLOCK_SPEED: error = spibus_set_clock(dev, *(uint32_t *)data); break; case SPIGENIOC_GET_SPI_MODE: - error = spibus_get_mode(dev, (uintptr_t *)data); + error = spibus_get_mode(dev, (uint32_t *)data); break; case SPIGENIOC_SET_SPI_MODE: error = spibus_set_mode(dev, *(uint32_t *)data);