Skip to content

Commit 6db359b

Browse files
LegoLivesMatterarndb
authored andcommitted
soc: pxa: ssp: fix casts
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>
1 parent 50d9edd commit 6db359b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/soc/pxa/ssp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ static int pxa_ssp_probe(struct platform_device *pdev)
152152
if (dev->of_node) {
153153
const struct of_device_id *id =
154154
of_match_device(of_match_ptr(pxa_ssp_of_ids), dev);
155-
ssp->type = (int) id->data;
155+
ssp->type = (uintptr_t) id->data;
156156
} else {
157157
const struct platform_device_id *id =
158158
platform_get_device_id(pdev);
159-
ssp->type = (int) id->driver_data;
159+
ssp->type = id->driver_data;
160160

161161
/* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id
162162
* starts from 0, do a translation here

0 commit comments

Comments
 (0)