From patchwork Tue Feb 26 02:29:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2183721 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 479CFDF230 for ; Tue, 26 Feb 2013 02:29:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760055Ab3BZC3h (ORCPT ); Mon, 25 Feb 2013 21:29:37 -0500 Received: from mail-bk0-f51.google.com ([209.85.214.51]:36928 "EHLO mail-bk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753276Ab3BZC3g (ORCPT ); Mon, 25 Feb 2013 21:29:36 -0500 Received: by mail-bk0-f51.google.com with SMTP id ik5so1620733bkc.38 for ; Mon, 25 Feb 2013 18:29:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=CNMoHrhfp4RXlQKpkjSjSRMOyrdwwYcKxfsVXUoT/A8=; b=pChRA+9Z/X9QsNWz6YxMh2d3UOQtVZxWGVFgW++PWh4PlvxAzXq6Yx92FgA7t3Erqd /jHbchGT3g14Z5Wpua5pVZGd7DiFor2BJP1n6P6g4qickwhSwBUkHrGFBl5yrlOUA1UN AhwngUxAbMeidR+gRuJlmd2hANZGTRLs98r/8AeTqLwg9NOOpch4S7Y6RcZNeTAkxESw 76JaTEzed8AmYMnfAW6iiOqe3VobOpQVSmdYLifo06SpDgCZeqdxgzgI6AIHb0n3bsX1 LMfaTDOvqZFaJz42Ex6XmuP6YdQ3CvbWb/byS5NPray4jagNAoIYuXOLU6eUq3zooZDV UoJg== MIME-Version: 1.0 X-Received: by 10.204.147.82 with SMTP id k18mr5789645bkv.38.1361845775009; Mon, 25 Feb 2013 18:29:35 -0800 (PST) Received: by 10.204.30.210 with HTTP; Mon, 25 Feb 2013 18:29:34 -0800 (PST) Date: Tue, 26 Feb 2013 10:29:34 +0800 Message-ID: Subject: [PATCH -next] wil6210: convert to use simple_open() From: Wei Yongjun To: qca_vkondrat@qca.qualcomm.com, linville@tuxdriver.com Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun Acked-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/debugfs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 65fc968..1e709bf 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -312,14 +312,6 @@ static const struct file_operations fops_memread = { .llseek = seq_lseek, }; -static int wil_default_open(struct inode *inode, struct file *file) -{ - if (inode->i_private) - file->private_data = inode->i_private; - - return 0; -} - static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { @@ -361,7 +353,7 @@ static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf, static const struct file_operations fops_ioblob = { .read = wil_read_file_ioblob, - .open = wil_default_open, + .open = simple_open, .llseek = default_llseek, }; @@ -396,7 +388,7 @@ static ssize_t wil_write_file_reset(struct file *file, const char __user *buf, static const struct file_operations fops_reset = { .write = wil_write_file_reset, - .open = wil_default_open, + .open = simple_open, }; /*---------Tx descriptor------------*/ @@ -526,7 +518,7 @@ static ssize_t wil_write_file_ssid(struct file *file, const char __user *buf, static const struct file_operations fops_ssid = { .read = wil_read_file_ssid, .write = wil_write_file_ssid, - .open = wil_default_open, + .open = simple_open, }; /*----------------*/