]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: core: Convert driver_bind() to use const
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:21:54 +0000 (12:21 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:52 +0000 (21:47 +0200)
The driver is not modified by driver model, so update driver_bind() to
recognise that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/core/device-remove.c
drivers/core/device.c
include/dm/device-internal.h
include/dm/device.h

index 3a5f48df7a27511a5bf9231e547360f11facdd7b..7fee1c001e4310d8b84355a518a69f93118b4d4d 100644 (file)
@@ -66,7 +66,7 @@ static int device_chld_remove(struct udevice *dev)
 
 int device_unbind(struct udevice *dev)
 {
-       struct driver *drv;
+       const struct driver *drv;
        int ret;
 
        if (!dev)
@@ -139,7 +139,7 @@ void device_free(struct udevice *dev)
 
 int device_remove(struct udevice *dev)
 {
-       struct driver *drv;
+       const struct driver *drv;
        int ret;
 
        if (!dev)
index 1ca5d1c7bcca6ec117d2458de78423e5af28de31..f1a03d92b74c8987a140aabd5e1022f692e61040 100644 (file)
@@ -24,8 +24,9 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int device_bind(struct udevice *parent, struct driver *drv, const char *name,
-               void *platdata, int of_offset, struct udevice **devp)
+int device_bind(struct udevice *parent, const struct driver *drv,
+               const char *name, void *platdata, int of_offset,
+               struct udevice **devp)
 {
        struct udevice *dev;
        struct uclass *uc;
@@ -181,7 +182,7 @@ static void *alloc_priv(int size, uint flags)
 
 int device_probe_child(struct udevice *dev, void *parent_priv)
 {
-       struct driver *drv;
+       const struct driver *drv;
        int size = 0;
        int ret;
        int seq;
index e2418fedb976deb9d57ed13a350a26d9ab7190eb..687462b093424a9e3706df839fa3846ef82dbe37 100644 (file)
@@ -34,7 +34,7 @@ struct udevice;
  * @devp: Returns a pointer to the bound device
  * @return 0 if OK, -ve on error
  */
-int device_bind(struct udevice *parent, struct driver *drv,
+int device_bind(struct udevice *parent, const struct driver *drv,
                const char *name, void *platdata, int of_offset,
                struct udevice **devp);
 
index f27b34b69960c9bfe142f198b2485de2e2b7d60f..fafecceb1ab1137cabe99f0af5fafd050b119bf4 100644 (file)
@@ -70,7 +70,7 @@ struct driver_info;
  * when the device is probed and will be unique within the device's uclass.
  */
 struct udevice {
-       struct driver *driver;
+       const struct driver *driver;
        const char *name;
        void *platdata;
        void *parent_platdata;