From patchwork Mon Apr 13 01:11:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 25871 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A29E1DE197 for ; Mon, 13 Apr 2009 11:16:03 +1000 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4AF55DE117; Mon, 13 Apr 2009 11:15:31 +1000 (EST) Received: from hera.kernel.org (IDENT:U2FsdGVkX19VK/Wt93eCV6u/Q+4aRqY4idMsGYH76us@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n3D1FPCJ005939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Apr 2009 01:15:25 GMT Received: (from geoff@localhost) by hera.kernel.org (8.14.2/8.13.1/Submit) id n3D1FPVV005938; Mon, 13 Apr 2009 01:15:25 GMT Message-Id: <20090413011136.646007801@am.sony.com> References: <20090413011136.475152916@am.sony.com> In-Reply-To: <20090413011136.475152916@am.sony.com> User-Agent: quilt/0.46-1 Date: Sun, 12 Apr 2009 18:11:38 -0700 From: Geoff Levand To: Jeremy Kerr Content-Disposition: inline; filename=revert-const-device.diff X-Virus-Scanned: ClamAV 0.93.3/9226/Sun Apr 12 20:02:45 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Mon, 13 Apr 2009 01:15:26 +0000 (UTC) Cc: cbe-oss-dev@ozlabs.org Subject: [Cbe-oss-dev] [patch 02/24] petitboot: Revert const device in discover_client_ops X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 --- ui/common/discover-client.h | 4 ++-- ui/test/pb-test.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/ui/common/discover-client.h +++ b/ui/common/discover-client.h @@ -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; }; --- a/ui/test/pb-test.c +++ b/ui/test/pb-test.c @@ -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 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");