From patchwork Thu Apr 12 01:02:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 7752 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 493AF23E29 for ; Thu, 12 Apr 2012 01:07:50 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 07B12A18142 for ; Thu, 12 Apr 2012 01:07:49 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2812570iag.11 for ; Wed, 11 Apr 2012 18:07:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-gm-message-state; bh=FQAZtSyqGglbBOPpC+WpYxtsY8Kw5pseuRYy9RyrUZg=; b=OnTKQoeavnCNNnbUN7ReLlctMlUo+gscHnyxJGEme+KT9TIGGwW7rrQmjpTZtJXFfP c0SGcksb0UU01SgIWKWJsHP4jRWUcljI/gRM8mZJPYPixn/L5bQCkI7fjR8Rv7ruGjqB xZ8vyxrWf1jbToptmM3nhgEaPdwO5TIVLS1x2gEGvDsNmm+rnhwIgNXPDDG9YYmuNMFF xBqsJnmhh0PUT3MHb+blCf95DBaagrV7vrBzcVqvaDKe+A7NImgOV/eZt8+jzd3qaV4i N+tYVhOug51czT8Y+kV2pFpPO+xiGDJNHVashVd22t310sdT/9ReIFsHd9gpHoyaLl1o dyGw== Received: by 10.50.156.229 with SMTP id wh5mr3891797igb.28.1334192869609; Wed, 11 Apr 2012 18:07:49 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp161861iby; Wed, 11 Apr 2012 18:07:49 -0700 (PDT) Received: by 10.60.7.200 with SMTP id l8mr574696oea.52.1334192868347; Wed, 11 Apr 2012 18:07:48 -0700 (PDT) Received: from comal.ext.ti.com (comal.ext.ti.com. [198.47.26.152]) by mx.google.com with ESMTPS id rz10si583150obc.44.2012.04.11.18.07.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Apr 2012 18:07:48 -0700 (PDT) Received-SPF: neutral (google.com: 198.47.26.152 is neither permitted nor denied by best guess record for domain of mturquette@linaro.org) client-ip=198.47.26.152; Authentication-Results: mx.google.com; spf=neutral (google.com: 198.47.26.152 is neither permitted nor denied by best guess record for domain of mturquette@linaro.org) smtp.mail=mturquette@linaro.org Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q3C17jIw023783; Wed, 11 Apr 2012 20:07:45 -0500 Received: from DFLE70.ent.ti.com (dfle70.ent.ti.com [128.247.5.40]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q3C17jAS002806; Wed, 11 Apr 2012 20:07:45 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle70.ent.ti.com (128.247.5.40) with Microsoft SMTP Server id 14.1.323.3; Wed, 11 Apr 2012 20:07:45 -0500 Received: from nucleus.nsc.com (nucleus.nsc.com [10.188.36.112]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q3C17PnC005839; Wed, 11 Apr 2012 20:07:43 -0500 From: Mike Turquette To: CC: , , , , Mark Brown , Mike Turquette , Olof Johansson , Russell King , Sascha Hauer , Shawn Guo , Richard Zhao , Saravana Kannan , Andrew Lunn , Rajendra Nayak , Viresh Kumar Subject: [PATCH 11/13] clk: Constify parent name arrays Date: Wed, 11 Apr 2012 18:02:49 -0700 Message-ID: <1334192572-12499-12-git-send-email-mturquette@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1334192572-12499-1-git-send-email-mturquette@linaro.org> References: <1334192572-12499-1-git-send-email-mturquette@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQme3JXyRp7GFuNbIPTbnE/dkPVKvn7gfad6eZIJp4pIo4AEDb4eH7VkV7+ynyWQ3eueouen From: Mark Brown Drivers should be able to declare their arrays of parent names as const so the APIs need to accept const arguments. Signed-off-by: Mark Brown [mturquette@linaro.org: constified gate] Signed-off-by: Mike Turquette Cc: Arnd Bergman Cc: Olof Johansson Cc: Russell King Cc: Sascha Hauer Cc: Shawn Guo Cc: Richard Zhao Cc: Saravana Kannan Cc: Andrew Lunn Cc: Rajendra Nayak Cc: Viresh Kumar --- drivers/clk/clk-mux.c | 2 +- drivers/clk/clk.c | 2 +- include/linux/clk-private.h | 2 +- include/linux/clk-provider.h | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 5424488..bd5e598 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -89,7 +89,7 @@ const struct clk_ops clk_mux_ops = { EXPORT_SYMBOL_GPL(clk_mux_ops); struct clk *clk_register_mux(struct device *dev, const char *name, - char **parent_names, u8 num_parents, unsigned long flags, + const char **parent_names, u8 num_parents, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_mux_flags, spinlock_t *lock) { diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index a24b121..ddade87 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1328,7 +1328,7 @@ out: */ struct clk *clk_register(struct device *dev, const char *name, const struct clk_ops *ops, struct clk_hw *hw, - char **parent_names, u8 num_parents, unsigned long flags) + const char **parent_names, u8 num_parents, unsigned long flags) { struct clk *clk; diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h index f19fee0..e9c8b98 100644 --- a/include/linux/clk-private.h +++ b/include/linux/clk-private.h @@ -30,7 +30,7 @@ struct clk { const struct clk_ops *ops; struct clk_hw *hw; struct clk *parent; - char **parent_names; + const char **parent_names; struct clk **parents; u8 num_parents; unsigned long rate; diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 6eb8e5d..8981435 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -176,7 +176,7 @@ struct clk_gate { u8 bit_idx; u8 flags; spinlock_t *lock; - char *parent[1]; + const char *parent[1]; }; #define CLK_GATE_SET_TO_DISABLE BIT(0) @@ -214,7 +214,7 @@ struct clk_divider { u8 width; u8 flags; spinlock_t *lock; - char *parent[1]; + const char *parent[1]; }; #define CLK_DIVIDER_ONE_BASED BIT(0) @@ -257,7 +257,7 @@ struct clk_mux { extern const struct clk_ops clk_mux_ops; struct clk *clk_register_mux(struct device *dev, const char *name, - char **parent_names, u8 num_parents, unsigned long flags, + const char **parent_names, u8 num_parents, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_mux_flags, spinlock_t *lock); @@ -278,7 +278,7 @@ struct clk *clk_register_mux(struct device *dev, const char *name, */ struct clk *clk_register(struct device *dev, const char *name, const struct clk_ops *ops, struct clk_hw *hw, - char **parent_names, u8 num_parents, unsigned long flags); + const char **parent_names, u8 num_parents, unsigned long flags); /* helper functions */ const char *__clk_get_name(struct clk *clk);