diff mbox series

[04/10] core: drop const for struct driver_info

Message ID 20200529181521.22073-5-walter.lozano@collabora.com
State Changes Requested
Delegated to: Simon Glass
Headers show
Series improve OF_PLATDATA support | expand

Commit Message

Walter Lozano May 29, 2020, 6:15 p.m. UTC
In order to prepare for a new support of phandle when OF_PLATDATA is used
drop the const for struct driver_info as this struct will need to be
updated on runtime.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
---
 drivers/core/device.c        | 2 +-
 drivers/core/root.c          | 2 +-
 include/dm/device-internal.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass June 4, 2020, 3:59 p.m. UTC | #1
On Fri, 29 May 2020 at 12:15, Walter Lozano <walter.lozano@collabora.com> wrote:
>
> In order to prepare for a new support of phandle when OF_PLATDATA is used
> drop the const for struct driver_info as this struct will need to be
> updated on runtime.
>
> Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
> ---
>  drivers/core/device.c        | 2 +-
>  drivers/core/root.c          | 2 +-
>  include/dm/device-internal.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/core/device.c b/drivers/core/device.c
index 0157bb1fe0..a0ad080aaf 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -246,7 +246,7 @@  int device_bind_ofnode(struct udevice *parent, const struct driver *drv,
 }
 
 int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
-			const struct driver_info *info, struct udevice **devp)
+			struct driver_info *info, struct udevice **devp)
 {
 	struct driver *drv;
 	uint platdata_size = 0;
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 14df16c280..c9ee56478a 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -25,7 +25,7 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const struct driver_info root_info = {
+static struct driver_info root_info = {
 	.name		= "root_driver",
 };
 
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 294d6c1810..5145fb4e14 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -81,7 +81,7 @@  int device_bind_with_driver_data(struct udevice *parent,
  * @return 0 if OK, -ve on error
  */
 int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
-			const struct driver_info *info, struct udevice **devp);
+			struct driver_info *info, struct udevice **devp);
 
 /**
  * device_ofdata_to_platdata() - Read platform data for a device