From patchwork Fri Jan 20 14:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9528595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BF9560113 for ; Fri, 20 Jan 2017 14:27:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E8A925EF7 for ; Fri, 20 Jan 2017 14:27:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 038B42868B; Fri, 20 Jan 2017 14:27:33 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACACD25EF7 for ; Fri, 20 Jan 2017 14:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752389AbdATO1T (ORCPT ); Fri, 20 Jan 2017 09:27:19 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35392 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbdATO1S (ORCPT ); Fri, 20 Jan 2017 09:27:18 -0500 Received: by mail-pg0-f68.google.com with SMTP id 204so7067170pge.2; Fri, 20 Jan 2017 06:27:17 -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:in-reply-to:references; bh=QVz52ovA7dzNulLSC0AN6Y6987n3CyKO7EWmybwTJ9Q=; b=bsbsvVhCZ5q1Yy3xy4qqtc47m2IaSxgRslD+wnYjd41/Gy/f6fsgyqsznaa2oAOUPw tqKtEsN6qtxJDvyncVQ5PK47jAHa0/gzXu6mYEllxi99wvSkbB5l+ozdcS7Rybf/Y7h8 sMVW+3oeYEcXXK768TjHltkpB4wBnccRpGYeyOQtfEl1b4AjYzpE9qDwjpdvrh9VDAry 4fyTrJFT55nYM93s7j0e6uPncti/gM16MPJvjuUleuOG3ravxmLsGrgvnOe48R6potSg OSCQcypn+s+95T/lRP4dyPdGvNrWIL2i5bLby3P/rTvnINJhg3xvP+Gns7cnoiueFBHC hS2g== 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:in-reply-to :references; bh=QVz52ovA7dzNulLSC0AN6Y6987n3CyKO7EWmybwTJ9Q=; b=pMI+1LQDAEQ9dTMqqixrpJB8Eoh4CwHG2VwfCyzz6BF/Y3+IZYliTJuTlzodX9cJaj SIa+notjNGboiiyDaLIulmwdTg2J362XCykoU6DqUMJmeFBhWeFl/w4ixJtwZOz/UjCm vLNzOFRkk+XEAkPLsnpi4qtNhvxTjAzBTB/9nMDGQm/wLFHpPJVARLbSGsB4Un+S2zRS t6ys9NWp4opYGc2CjGTuMqHE8KDNCA+F6988takkAV0UQ9QEKkIWQVBTASHgT7QUFYzS dXeA5DYfSdyFCtY52Fl7ttpSH1t2lJ9kjcskBWLrveb28mWcd4c1P4nXvuwyMew83ytg D0xQ== X-Gm-Message-State: AIkVDXKxEUgm+8GOn3hfov1gDkUmslnfXE0y8be+tlQpZX8xpauAejzZjQO5ps8KSSL81w== X-Received: by 10.84.214.150 with SMTP id j22mr22139130pli.23.1484922437529; Fri, 20 Jan 2017 06:27:17 -0800 (PST) Received: from localhost ([162.211.125.117]) by smtp.gmail.com with ESMTPSA id c18sm6079535pfj.49.2017.01.20.06.27.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2017 06:27:17 -0800 (PST) From: Geliang Tang To: Bartlomiej Zolnierkiewicz Cc: Geliang Tang , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video/mbx: use simple_open() Date: Fri, 20 Jan 2017 22:27:05 +0800 Message-Id: <70f5253031d545642db17d64535f228752c12e6e.1484903730.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <697f2692562e48afa03304a7e605e8adbee8437e.1484829069.git.geliangtang@gmail.com> References: <697f2692562e48afa03304a7e605e8adbee8437e.1484829069.git.geliangtang@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop open_file_generic(), use simple_open() instead of it. Signed-off-by: Geliang Tang --- drivers/video/fbdev/mbx/mbxdebugfs.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c index e3bc00a..2528d3e 100644 --- a/drivers/video/fbdev/mbx/mbxdebugfs.c +++ b/drivers/video/fbdev/mbx/mbxdebugfs.c @@ -15,12 +15,6 @@ struct mbxfb_debugfs_data { struct dentry *misc; }; -static int open_file_generic(struct inode *inode, struct file *file) -{ - file->private_data = inode->i_private; - return 0; -} - static ssize_t write_file_dummy(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -174,42 +168,42 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf, static const struct file_operations sysconf_fops = { .read = sysconf_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, }; static const struct file_operations clock_fops = { .read = clock_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, }; static const struct file_operations display_fops = { .read = display_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, }; static const struct file_operations gsctl_fops = { .read = gsctl_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, }; static const struct file_operations sdram_fops = { .read = sdram_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, }; static const struct file_operations misc_fops = { .read = misc_read_file, .write = write_file_dummy, - .open = open_file_generic, + .open = simple_open, .llseek = default_llseek, };