Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp35481pxk; Tue, 15 Sep 2020 19:30:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8t1oxUoHF5jFel4wmbCYVFBE4LP6/liBpxkQlxezRwSxF+YHOfgM3CF+4OwroQ3oL4lKr X-Received: by 2002:a17:906:9353:: with SMTP id p19mr22802934ejw.403.1600223451381; Tue, 15 Sep 2020 19:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600223451; cv=none; d=google.com; s=arc-20160816; b=nEQhHizWreG8T0AfBIgUgyuZrpkua88X4Sft3r/6a3g5rHyP6PfUoI1MNKW6uhCwdu eZ2kyeT3mD+EAJdSHt+NRP8cK52y48qP1wJyJiLizyTrFnKqusWaB19xY5eiN40SmbeE VKj6pxChAMt14PsTBQSDbmaG3ID14L8gy/LqQ1iFgKJ5XOVYRpGVEL6N4kJfiyMO2Fik SF0i685s8irg2BpWUdyqQMUq+7s7OEnQYhz1jnMNeQ0tXIBDqLFrBUL1VRbbmYN2pbka eKRcFgBjlCdfnNeNv+zkt2mRyzTOMVRD2D9XbOREz+MY39mt8Z32kfKRtFk7woUxxqRo FhuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=MYwebUVi84lL8gUE8DdaRiB7fXD1cgUSulwpGVJQfzY=; b=UD1Edc//y4cTe0z9YOELOKsBbyuyGqdGvzP7lCLQk/yfb9DAhpC3rYemSOUpm7t5Ts cSI7+k9+9k5dMaWwEe6Vd83Hw9CaOe0L+0QjYKDftCON3txe7NlttcYs1E2O2G/DiT+R z9vlSqqD9nHDkSSslMqwhPsuUEVff292npdQGAvn8EoamAThv5GHVhww1bs2niLstmZK s+6dREbOfog4+qN82mViAZHZMCepRhcHbXrlXxvRAHpYpNPNFVF8XToYU4u1cfx+ms3Z ZIvHvE0C366aIayo8l4cSYbySvjlfxaeMl+Y3exg3ditjOB/nvrXhaZII2eYl+7em4YG /P4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si11064555edy.412.2020.09.15.19.30.28; Tue, 15 Sep 2020 19:30:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbgIPC3A (ORCPT + 99 others); Tue, 15 Sep 2020 22:29:00 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:58318 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726399AbgIPC2A (ORCPT ); Tue, 15 Sep 2020 22:28:00 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 92663282DCA4FDA37810; Wed, 16 Sep 2020 10:27:57 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Wed, 16 Sep 2020 10:27:48 +0800 From: Liu Shixin To: Mauro Carvalho Chehab CC: , , Liu Shixin Subject: [PATCH -next] media: saa7164: convert to use DEFINE_SEQ_ATTRIBUTE macro Date: Wed, 16 Sep 2020 10:50:24 +0800 Message-ID: <20200916025024.3992731-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin --- drivers/media/pci/saa7164/saa7164-core.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 6c08b77bfd47..f3a4e575a782 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1139,32 +1139,21 @@ static int saa7164_seq_show(struct seq_file *m, void *v) return 0; } -static const struct seq_operations saa7164_seq_ops = { +static const struct seq_operations saa7164_sops = { .start = saa7164_seq_start, .next = saa7164_seq_next, .stop = saa7164_seq_stop, .show = saa7164_seq_show, }; -static int saa7164_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &saa7164_seq_ops); -} - -static const struct file_operations saa7164_operations = { - .owner = THIS_MODULE, - .open = saa7164_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; +DEFINE_SEQ_ATTRIBUTE(saa7164); static struct dentry *saa7614_dentry; static void __init saa7164_debugfs_create(void) { saa7614_dentry = debugfs_create_file("saa7164", 0444, NULL, NULL, - &saa7164_operations); + &saa7164_fops); } static void __exit saa7164_debugfs_remove(void) -- 2.25.1