]> git.ozlabs.org Git - petitboot/commitdiff
Revert const device in discover_client_ops
authorGeoff Levand <geoffrey.levand@am.sony.com>
Sun, 12 Apr 2009 15:11:38 +0000 (15:11 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 30 Jun 2009 07:29:00 +0000 (15:29 +0800)
Make the device structure passed to the discover_client_ops callbacks
writable.

Commit 2b42cdd35ccd83c52e9df257efdfcda040d170d9 (Make client ops constant)
changed the discover_client_ops callback routine arguments to be pointers
to const device structures.  Typically, the callback routines will
initialize and destroy the device.ui_info and boot_option.info variables,
so the device instance must be writable by the callback routines.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/common/discover-client.h
ui/test/pb-test.c

index d2a8fc4c15001002ab38d6c1851bb4c1ca72a6cf..f9f74e5c622b4aa51d9c07c4ce76545d8f547dc4 100644 (file)
@@ -13,8 +13,8 @@ struct discover_client;
  */
 
 struct discover_client_ops {
-       int (*device_add)(const struct device *device, void *arg);
-       void (*device_remove)(const struct device *device, void *arg);
+       int (*device_add)(struct device *device, void *arg);
+       void (*device_remove)(struct device *device, void *arg);
        void *cb_arg;
 };
 
index 69f65fb6ec018f0ff344b35614f0d6895a8ecc63..f3ef746de2382488fc40c469dcbe0e39c37383da 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui/common/discover-client.h"
 
-static int print_device_add(const struct device *device,
+static int print_device_add(struct device *device,
        void __attribute__((unused)) *arg)
 {
        struct boot_option *opt;
@@ -28,7 +28,7 @@ static int print_device_add(const struct device *device,
        return 0;
 }
 
-static void print_device_remove(const struct device *device,
+static void print_device_remove(struct device *device,
        void __attribute__((unused)) *arg)
 {
        printf("removed device:\n");