From patchwork Sat Dec 15 09:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10732043 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 D30E913AD for ; Sat, 15 Dec 2018 09:01:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B308E2C0AB for ; Sat, 15 Dec 2018 09:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4D652C0C2; Sat, 15 Dec 2018 09:01:36 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 52FD92C0AB for ; Sat, 15 Dec 2018 09:01:36 +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=CgutxfIDSUAAdcVRpKz7ZFtEZRDbbDrdIRxd9v1BvkU=; b=BFp LtJKOZn9DOYAhLtcfIXjIhMQ9AQrJ+tvjxNkj2i+y+r+qWdJ7ScqODX+7ZQp22eq9LWzrBLAFviqv LF8Rm+S0SKIibAbUZB1k5VHZbRl7+SgCybIxiRZJmrgz1oqW7gUMzTlfHwAaPgO6RZ9ZJt31nJQRX lPfbM9Ptl4GD6jb5jlu7x2qKO0QrKsnkGVjV8ahn2vDumJFNK1NBPOM7utkV8Os8a5KbW/coJxq8e JWd+oclGitHMxvOB7yDIoHP/hLwMjImLnio9CoNtciGpZpNEYkPx8ABMIw+yAaMqNrVOEEIK1s+VR ShXZheyS/e+RDgUVQh2tjPKP0eHL3mg==; 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 1gY5pC-00043C-M3; Sat, 15 Dec 2018 09:01:30 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gY5p8-00041n-Tg; Sat, 15 Dec 2018 09:01:28 +0000 Received: by mail-pl1-x641.google.com with SMTP id 101so3835077pld.6; Sat, 15 Dec 2018 01:01:16 -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=Su8n08XRlyKs97RUCXcwmzT3Jsdm0K6ctXziX1UaMAk=; b=DULst49iCyZ7xVT7jW9S4FwmOPcFhWnVvVJWAPIr27fnqvvTS5+Pz1/XjKmOSAMaKL 1lrBQ8It1XtIMTMICJBecC4fbqJ15Pien5jkQSNvXP6PMN7YyxfMxJlDAOKcwQzGNoWA 5bVmdmNXHlLJc9aiN1mDbflTbUpQmyxxvlAiBIgFvTGlKzohMU/okAJIlZVllFL0HNRZ jryLinBSnuG+Mof/iAVVVftagqWNxBTZuXbK1OyRsx4fojV3OkLqE2H/5hvcMhEjQCRT GHfp8rdEThQXhSWqNSTMoOH4qB19bN8sI11rk5QLuB52I+GdYrAS/xIUZ7UZ0CiBQsSe iSww== 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=Su8n08XRlyKs97RUCXcwmzT3Jsdm0K6ctXziX1UaMAk=; b=nhaPglT0a5ulQ9ff2WMsXWVQiG2QMg8e2VDb1xRvstcSiLSfG3lWV57kChpImmOEA1 ABmp992eZ3ht31+pMnP8MXo5mLmcf90UKEn5r9cRjmnxVkMlGDgNE8Mgji+cZV2WXlhf h5K/V5IrkncOLC3+31JueLs5jRhT1OLZK+2z5gvKFcA66d/8BpaP/OyvW1nRiSld4egC s2rG27Gr6+HB2RSG39at9wdt6r5hzAFQV1AjAb364BZKn9kZaNyDoAPgSVnQRbGDvh+4 V2zE7LS9fU8DmI/T1VjkVh6TWeyqxhFRC78R/a2lMJ7WBKgL3cAVZWE7M0G8zQV7C/3E xHww== X-Gm-Message-State: AA+aEWbG2WtvK+FR1GV1vAztRqBees/ZQ3484+gkHZV0bYE3qVpsHNba +CxfEiFxomNAOzdEAu4PNj7H4I3Ndl4= X-Google-Smtp-Source: AFSGD/XPldE48M9ROqu+va0waBSk1lhcnhZKtKwK3eJIUlRfqw8beYYSbu5EzBQTwU5Giyp7UpkT1g== X-Received: by 2002:a17:902:4225:: with SMTP id g34mr5929460pld.152.1544864475852; Sat, 15 Dec 2018 01:01:15 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id r8sm8170734pgr.48.2018.12.15.01.01.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 01:01:15 -0800 (PST) From: Yangtao Li To: eric@anholt.net, stefan.wahren@i2se.com, gregkh@linuxfoundation.org, colin.king@canonical.com Subject: [RESEND] staging: vc04_services: convert to DEFINE_SHOW_ATTRIBUTE Date: Sat, 15 Dec 2018 04:01:13 -0500 Message-Id: <20181215090113.27847-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-20181215_010126_956117_E731C1B0 X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. 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: devel@driverdev.osuosl.org, Yangtao Li , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 --- .../interface/vchiq_arm/vchiq_debugfs.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c index 6a9e71a61142..46ba21967820 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -153,19 +153,7 @@ static int debugfs_usecount_show(struct seq_file *f, void *offset) return 0; } - -static int debugfs_usecount_open(struct inode *inode, struct file *file) -{ - return single_open(file, debugfs_usecount_show, inode->i_private); -} - -static const struct file_operations debugfs_usecount_fops = { - .owner = THIS_MODULE, - .open = debugfs_usecount_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(debugfs_usecount); static int debugfs_trace_show(struct seq_file *f, void *offset) {