From patchwork Wed Oct 13 07:44:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 249891 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9D7gKY9014915 for ; Wed, 13 Oct 2010 07:42:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753240Ab0JMHmT (ORCPT ); Wed, 13 Oct 2010 03:42:19 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:62996 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753148Ab0JMHmT (ORCPT ); Wed, 13 Oct 2010 03:42:19 -0400 Received: by pvc7 with SMTP id 7so292391pvc.19 for ; Wed, 13 Oct 2010 00:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=QIq94in86zdBwh3OGl+0PF89DhBzcUiomxMwSmlR7rk=; b=sA3QHqzRGAoCC2pgoO6MBLoZSJjaC0TkTCi5McPxUCcMgKaPH/U+6lvDXavdWABBJj Uxe14VL/RXjSGBxkT2bWtWuErXL50GAY/5ACTlg2VtqkMpKer/7M44S6nWUqqg+X4Ely qFT5ypkc0lhepsbj3E7gzIzY3Z7SLZ3DoGmtc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=sR05CmCQ9SMEj5yHaSebzJj85Q9ZpZZoExasLkGF4hwvZ959Y+ZDAfCOwhPIjd91dU Pyjyb0aoUpEJtO9plsj8M3zml6va70eT9fkkcETlwLbj5zHkZUlAUZTlabFGUIOMLW0z sdHVGJ1nKo+5zoslF63c4Oiby0SUP2vEmfLnI= Received: by 10.142.147.5 with SMTP id u5mr3236696wfd.93.1286955739144; Wed, 13 Oct 2010 00:42:19 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id y42sm4778046wfd.22.2010.10.13.00.42.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 13 Oct 2010 00:42:18 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Wed, 13 Oct 2010 16:44:36 +0900 Message-Id: <20101013074436.19791.66447.sendpatchset@t400s> Subject: [PATCH] sh: remove name and id from struct clk Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 13 Oct 2010 07:42:20 +0000 (UTC) --- 0001/drivers/sh/clk-cpg.c +++ work/drivers/sh/clk-cpg.c 2010-10-13 15:59:17.000000000 +0900 @@ -180,7 +180,6 @@ static int __init sh_clk_div6_register_o clkp = clks + k; clkp->ops = ops; - clkp->id = -1; clkp->freq_table = freq_table + (k * freq_table_size); clkp->freq_table[nr_divs].frequency = CPUFREQ_TABLE_END; @@ -319,7 +318,6 @@ static int __init sh_clk_div4_register_o clkp = clks + k; clkp->ops = ops; - clkp->id = -1; clkp->priv = table; clkp->freq_table = freq_table + (k * freq_table_size); --- 0001/drivers/sh/clk.c +++ work/drivers/sh/clk.c 2010-10-13 15:58:42.000000000 +0900 @@ -160,8 +160,8 @@ void propagate_rate(struct clk *tclk) static void __clk_disable(struct clk *clk) { - if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n", - clk->name)) + if (WARN(!clk->usecount, "Trying to disable clock %p with 0 usecount\n", + clk)) return; if (!(--clk->usecount)) { @@ -354,8 +354,8 @@ int clk_set_parent(struct clk *clk, stru ret = clk_reparent(clk, parent); if (ret == 0) { - pr_debug("clock: set parent of %s to %s (new rate %ld)\n", - clk->name, clk->parent->name, clk->rate); + pr_debug("clock: set parent of %p to %p (new rate %ld)\n", + clk, clk->parent, clk->rate); if (clk->ops->recalc) clk->rate = clk->ops->recalc(clk); propagate_rate(clk); @@ -469,9 +469,7 @@ static int clk_debugfs_register_one(stru char s[255]; char *p = s; - p += sprintf(p, "%s", c->name); - if (c->id >= 0) - sprintf(p, ":%d", c->id); + p += sprintf(p, "%p", c); d = debugfs_create_dir(s, pa ? pa->dentry : clk_debugfs_root); if (!d) return -ENOMEM; @@ -513,7 +511,7 @@ static int clk_debugfs_register(struct c return err; } - if (!c->dentry && c->name) { + if (!c->dentry) { err = clk_debugfs_register_one(c); if (err) return err; --- 0001/include/linux/sh_clk.h +++ work/include/linux/sh_clk.h 2010-10-13 15:55:08.000000000 +0900 @@ -21,9 +21,6 @@ struct clk_ops { struct clk { struct list_head node; - const char *name; - int id; - struct clk *parent; struct clk **parent_table; /* list of parents to */ unsigned short parent_num; /* choose between */