ANDROID: fix up platform_device ABI break

In commit 063444d66f ("driver: platform: Add helper for safer setting
of driver_override"), a pointer was changed to const, which messes with
the CRC and ABI checks.  As the code is fine if this is left as
not-const, just put it back to preserve the abi.

Bug: 161946584
Fixes: 063444d66f ("driver: platform: Add helper for safer setting of driver_override")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ieb4a730a6a5767d31fbec2f1ba683617f5cda7a9
(cherry picked from commit 398b357f13)
Signed-off-by: Lee Jones <joneslee@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-11-25 18:15:03 +00:00 committed by Lee Jones
parent b05d8acf42
commit a1f6648aa3
2 changed files with 2 additions and 2 deletions

View File

@ -975,7 +975,7 @@ static ssize_t driver_override_store(struct device *dev,
struct platform_device *pdev = to_platform_device(dev);
int ret;
ret = driver_set_override(dev, &pdev->driver_override, buf, count);
ret = driver_set_override(dev, (const char **)&pdev->driver_override, buf, count);
if (ret)
return ret;

View File

@ -33,7 +33,7 @@ struct platform_device {
* Driver name to force a match. Do not set directly, because core
* frees it. Use driver_set_override() to set or clear it.
*/
const char *driver_override;
char *driver_override;
/* MFD cell pointer */
struct mfd_cell *mfd_cell;