device property: Constify device_get_match_data()

Constify device_get_match_data() as OF and ACPI variants return
constant value.

Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Andy Shevchenko 2018-02-09 17:38:36 +02:00 • committed by Rafael J. Wysocki
commit 67dcc26d20
7 changed files with 12 additions and 13 deletions

View file

@ -830,7 +830,7 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
}
EXPORT_SYMBOL_GPL(acpi_match_device);
void *acpi_device_get_match_data(const struct device *dev)
const void *acpi_device_get_match_data(const struct device *dev)
{
const struct acpi_device_id *match;
@ -838,7 +838,7 @@ void *acpi_device_get_match_data(const struct device *dev)
if (!match)
return NULL;
return (void *)match->driver_data;
return (const void *)match->driver_data;
}
EXPORT_SYMBOL_GPL(acpi_device_get_match_data);

View file

@ -1271,7 +1271,7 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
return 0;
}
static void *
static const void *
acpi_fwnode_device_get_match_data(const struct fwnode_handle *fwnode,
const struct device *dev)
{