From patchwork Tue Nov 6 14:33:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10670565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E27F613BF for ; Tue, 6 Nov 2018 14:34:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2955293B8 for ; Tue, 6 Nov 2018 14:34:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C704829517; Tue, 6 Nov 2018 14:34:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 805FA293B8 for ; Tue, 6 Nov 2018 14:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ekUMUUCs0lKcMPaM2Y5yDJ7ydEY5cez5t1eMFTWWWK4=; b=SAU fI8P6YRgFXCZrNT30+kVXi2F6AFoex779Rr4ehgOCZxkonoy5DS6rVaoYcP1XnYCq15FY5rWBdJ9+ pS5mmSbbM/3Za/icQ47rTIktztR+zEiTGt/dQKql20odk1WBrDNeI3KgPdsqo450S8/Lj1sg3CeEc IapXKTWQBSsoQSttYrXzm8neyhPuTpxOEuf9z7muAJQsuwI2wFaV+nN1ygmOONFNyDsOWxwu4wQeQ BRr2USKYsIVC1IQe3T5GCYxDzdDmgOyBb1VuWAeqUxiDEjzjGloXb0WG2fGAhaKjxBD73FHosLaTn gaWN4hTwphhgCUQmRr/KNFH8T4md41A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK2Qm-00030C-Ma; Tue, 06 Nov 2018 14:34:12 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK2Qj-0002zH-Nq for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2018 14:34:11 +0000 Received: by mail-pg1-x543.google.com with SMTP id 32-v6so5906929pgu.2 for ; Tue, 06 Nov 2018 06:33:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Yer/Du/1VUiCviJYqajeeC5X6xv8Jq2VH6srI+DyCMs=; b=AqchyGy6ZOuxRSjaxvcM/Pj8cC2OvvDDwQCQKMYmwkdkGYUnA/ST9K2+XBjYJ7Ktdx 3+m+anW6D5yeOQAMeeOhTes77tMQZyzL2FykxwRmNaOqlWWRriglB9By0Xw57xBjMutf sCb5SU61OCDqh0bpm49cKNifuYTAY8ZxzwxCv+uyVrYcw5X0MIO+VXvrf4j1gYorgfrS lNGtpoucTI4FatENZGEDcDRxTpQBO0iT/3BEXgoJjLEA0rD/Cc5M5lPZjj/jLmGuNMxX jui48aQ7B4m11hkqJwsZSxC1BRYM85HPdEd3IIopNDi6jStsarTb86+mEyJGzbGyB+XB 2cvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Yer/Du/1VUiCviJYqajeeC5X6xv8Jq2VH6srI+DyCMs=; b=csxQ+oANWwrHm9BDCJHtUdeGchWUFo59a5OfkEKw3aDW11EM6fv7ctjYhfoFSTx34t 35dE3H1Qf0bmB5GwBj9AiM+1XrvXtzPnDXLjN/uORKX0kMzr9r/Lm074lTKNNz3W48a/ 7cCh9yIyVGWsorHQdQaQMvkfIIZpLZ+YwmhxY/6igH1aBuKEOf1hV8eExHSyY5RcaVZV WFGgYYB5o7BztQ60axwvs5TFNI1qcfo9fENE5OVzlBgGTe6YK8WURBjDlGBjXgweKYlZ QQRLul+KcHk1BCMHnHhEkFnXUApiP4TCSb5ZogP/wu3m2/cUZINzYWOrChBA7+J/2Gij Dp7g== X-Gm-Message-State: AGRZ1gI82Q3XV4WoKcQmpNmDhnq1Y9Xdn8Rru2S5VUmEtjcyVqJMZLQR 32hEcDlAX1/MLk0vNonJkA4= X-Google-Smtp-Source: AJdET5e0TodW479xtgQ1UzuG7xceYJb6vT5esRGFnfnl+sYx3WbBSn9gkP5hHQdob20v6R/UQXgS8g== X-Received: by 2002:a62:a218:: with SMTP id m24-v6mr25799492pff.99.1541514838296; Tue, 06 Nov 2018 06:33:58 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id h25-v6sm46545194pgv.27.2018.11.06.06.33.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 06:33:57 -0800 (PST) From: Yangtao Li To: paul@pwsan.com, aaro.koskinen@iki.fi, tony@atomide.com, linux@armlinux.org.uk Subject: [PATCH] ARM: OMAP1: clock: Change to use DEFINE_SHOW_ATTRIBUTE macro Date: Tue, 6 Nov 2018 09:33:55 -0500 Message-Id: <20181106143355.8340-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_063409_775305_41D6F1ED X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yangtao Li , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- arch/arm/mach-omap1/clock.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index fa512413a471..c8c6fe88b2d6 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -968,7 +968,7 @@ late_initcall(omap_clk_enable_autoidle_all); static struct dentry *clk_debugfs_root; -static int clk_dbg_show_summary(struct seq_file *s, void *unused) +static int debug_clock_show(struct seq_file *s, void *unused) { struct clk *c; struct clk *pa; @@ -988,17 +988,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused) return 0; } -static int clk_dbg_open(struct inode *inode, struct file *file) -{ - return single_open(file, clk_dbg_show_summary, inode->i_private); -} - -static const struct file_operations debug_clock_fops = { - .open = clk_dbg_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(debug_clock); static int clk_debugfs_register_one(struct clk *c) {