drivers: leds: Fix -Wpointer-to-int-cast.

drivers/leds/leds-qti-flash.c:1787:22: warning: cast to smaller integer type 'u8' (aka 'unsigned char') from 'const void *' [-Wvoid-pointer-to-int-cast]
        led->max_channels = (u8)of_device_get_match_data(&pdev->dev);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I377fdb83ccd9822cb78d146de25f42596923a13e
This commit is contained in:
lucaswei 2022-02-03 16:54:42 -07:00 committed by Michael Bestas
parent 8bdf188cf5
commit d32ea54b7d
No known key found for this signature in database
GPG Key ID: CC95044519BE6669

View File

@ -1784,7 +1784,7 @@ static int qti_flash_led_probe(struct platform_device *pdev)
return -EINVAL;
}
led->max_channels = (u8)of_device_get_match_data(&pdev->dev);
led->max_channels = (u8)(long)of_device_get_match_data(&pdev->dev);
if (!led->max_channels) {
pr_err("Failed to get max supported led channels\n");
return -EINVAL;