]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
soc: pxa: ssp: fix casts
authorDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 6 Jan 2024 14:11:33 +0000 (15:11 +0100)
committerArnd Bergmann <arnd@arndb.de>
Tue, 9 Jan 2024 07:25:29 +0000 (08:25 +0100)
On ARM64 platforms, id->data is a 64-bit value and casting it to a
32-bit integer causes build errors. Cast it to uintptr_t instead.

The id->driver_data cast is unnecessary, so drop it.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240106-pxa-ssp-v2-1-69ac9f028bba@skole.hr
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/soc/pxa/ssp.c

index a1e8a07f72753f78fb3d23a77de2249b9751aa6d..7af04e8b816376509163a848ae18f3f9d94588f5 100644 (file)
@@ -152,11 +152,11 @@ static int pxa_ssp_probe(struct platform_device *pdev)
        if (dev->of_node) {
                const struct of_device_id *id =
                        of_match_device(of_match_ptr(pxa_ssp_of_ids), dev);
-               ssp->type = (int) id->data;
+               ssp->type = (uintptr_t) id->data;
        } else {
                const struct platform_device_id *id =
                        platform_get_device_id(pdev);
-               ssp->type = (int) id->driver_data;
+               ssp->type = id->driver_data;
 
                /* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id
                 * starts from 0, do a translation here