Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b72086d authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Alexandre Belloni
Browse files

rtc: s3c: Do not remove const from rodata memory



All instances of struct s3c_rtc_data are in fact static const thus
put in rodata so we should not drop the const while getting the pointer
to them.

Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 21df6fed
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ struct s3c_rtc {
	struct clk *rtc_src_clk;
	bool clk_disabled;

	struct s3c_rtc_data *data;
	const struct s3c_rtc_data *data;

	int irq_alarm;
	int irq_tick;
@@ -437,12 +437,12 @@ static int s3c_rtc_remove(struct platform_device *pdev)

static const struct of_device_id s3c_rtc_dt_match[];

static struct s3c_rtc_data *s3c_rtc_get_data(struct platform_device *pdev)
static const struct s3c_rtc_data *s3c_rtc_get_data(struct platform_device *pdev)
{
	const struct of_device_id *match;

	match = of_match_node(s3c_rtc_dt_match, pdev->dev.of_node);
	return (struct s3c_rtc_data *)match->data;
	return match->data;
}

static int s3c_rtc_probe(struct platform_device *pdev)