From patchwork Tue Nov 6 14:35:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10670569 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 7759B13BF for ; Tue, 6 Nov 2018 14:35:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 650F429517 for ; Tue, 6 Nov 2018 14:35:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5931D2A095; Tue, 6 Nov 2018 14:35:35 +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 05D8229517 for ; Tue, 6 Nov 2018 14:35:34 +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=QklABhJ3Z1WjYhFnGaQNxT3Qm2cXYDPpnM2vilOyYOY=; b=Nb+ jtlsAlXfP3W8ldrc2EMLNBvmiIE0Z+/3UrXooxVJ1T/mcXcuDqS5ESNX+zTVkYrj/sD1yZzmYcoAy liQQarErPxZC3wOmoGevhrGV/4aClyYiaKG0rlB3CU6qJuQ9FylLV51ralbFjvENa9vZVx2oBPGdh sNCQfU0pG6n+QoJn1aBvJNekv+59bbTyEy6N62faUNZ+UTvFSDuk4KJPeFDC6BGxvII67aPfaDdK5 dgukAdTZkHc9+v0XwccQjd/hD9gCIHFi9Stbe31Clbfd8+1dFHYeNMdL9WGcxCyqsoWPaTJarjm17 A0e0bqoNk0yUlgtCpG88ZTgO34gQ6gw==; 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 1gK2S3-0004Zq-SE; Tue, 06 Nov 2018 14:35:31 +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 1gK2S1-0004Yn-4e for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2018 14:35:30 +0000 Received: by mail-pg1-x543.google.com with SMTP id w7so5882055pgp.13 for ; Tue, 06 Nov 2018 06:35:19 -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=pdFhDs5I1ZXL1i5BmjG1jSbFtvqAaYqW7KD8G31fZ5A=; b=WokdY0JLUOyJBOuZx9ywaKjMP6c+AEOfzgnCFVF1A7K6jsmoRl91L3q7D7Qftk4R8z 13UnCMi10QDArLNvTRgQkBdyLeEHBlb3v4K3ONaJVr1zOzODK7ZpHh0MfEbe8G5gGeMC Q2SEqTwL98E3uLDQMaDpTWqNtfQ+dL5zoptXo/DY4rY/8sYDDLNwNOqiLW3gz7OeI38b JPtpAfJL3sNVhoyewFCeWC9woD/N964y9d2Y4U9sASMnxja9T7J9BUCp6n+TgS2UZXIH R6+M4KaSQdeh+cljh1JcSh1h8iprm8+bTwK6B5Qh/FT8G+NuXZGypFLNAR7a+fhvxFue Z+LQ== 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=pdFhDs5I1ZXL1i5BmjG1jSbFtvqAaYqW7KD8G31fZ5A=; b=V/+k6up98mHjrad00a57HdBQWWC+fOQfdO2WveBcAUxZLqcjcU9aQqXVkZMcvEeV0m 5n0ilsWRYut9P2SAbRTD7xZlqJdPdCyBBMsl15PwsqpKexzZU78Bg7ynd/OQQ9tt6/d3 1f0l9pHhjdMM2keXOtxXhpBagXVF1xxmEybV4xr+dnLc4yTebZ+/arD7dlODMXvtQv1o 8JjruY5o3hTlfU33QUj3ZWc/QLvSnJ3FhhtxDM2kCz5q1TfN9TdcTNwxOYjkZCDklEMC gYRFEtomzJcqhNTvkpobqvaN/REWDUyGA3qXuUoJZ9v0u41/W/HQU/IovZaZLs3JLWMC egNg== X-Gm-Message-State: AGRZ1gLv+GlSaXEMU4QRQA2sy2zyaXectrhIFJyUMT3ZGSVeaoFGwvl2 83VIRvpJbrtlyvpBl7RRYlw= X-Google-Smtp-Source: AJdET5f6ZVkPvunbuT6ceMsV2qfUnZKpvKqZuilJ3LqgczusCqRuA5TCtnSVxSNfJpMkK4O2SL6DZw== X-Received: by 2002:a63:65c7:: with SMTP id z190mr24023587pgb.249.1541514918662; Tue, 06 Nov 2018 06:35:18 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id p2sm10167068pgc.94.2018.11.06.06.35.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 06:35:18 -0800 (PST) From: Yangtao Li To: khilman@kernel.org, aaro.koskinen@iki.fi, tony@atomide.com, linux@armlinux.org.uk Subject: [PATCH] ARM: OMAP: PM: Change to use DEFINE_SHOW_ATTRIBUTE macro Date: Tue, 6 Nov 2018 09:35:16 -0500 Message-Id: <20181106143516.8394-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_063529_181456_1991AAFB X-CRM114-Status: GOOD ( 11.96 ) 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/pm.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 3e1de14805e4..998075d3ef86 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -532,18 +532,7 @@ static int omap_pm_debug_show(struct seq_file *m, void *v) return 0; } -static int omap_pm_debug_open(struct inode *inode, struct file *file) -{ - return single_open(file, omap_pm_debug_show, - &inode->i_private); -} - -static const struct file_operations omap_pm_debug_fops = { - .open = omap_pm_debug_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(omap_pm_debug); static void omap_pm_init_debugfs(void) {