Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1062252ybh; Thu, 16 Jul 2020 02:00:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNamS44Iz3g+yEkHV8ke34XJbaLzNs7CoihJu+e1dSsQoP7RiV583rTl+rpkefLiYXz+lj X-Received: by 2002:a17:906:c10f:: with SMTP id do15mr2852411ejc.249.1594890030920; Thu, 16 Jul 2020 02:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594890030; cv=none; d=google.com; s=arc-20160816; b=vnpmaMaExpUYt8+QsmEpSUqqcD25E9UoS5UM+O33x6uT82XGjCnJpGHFCWfEVxr9+1 PdWaCwNJ0ybB4p37MZk21G3PNRwb3XvE6d4UJBoEPi8plKJrPaCc59X2zmFpxOWCNNA1 BoFQ7ywb3nq0YlaKAocPa2TrVybT4z9umyvC+RiznjtpztnrarSCuZsLhiKwfmJsEZFL m95VdQ+7szWiqvIREgivdhYRyxzniP2OlUNfLJhPJN4WoWEaDbsfGkfcpC2h5gIoWJIN mnJLozZOVqVp8CezImdxb6kMWyZTZVx4pUEHIURFXykk1HaEe9Timyis9DuQjT4MJyR2 MgLw== 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=t7J8RvGIBFF738Bzk/xVHnByU+bvNqwH5rNQ6ZYv+KY=; b=Nu/zk3uUnVuZZyRu7ZsBKdK0UZ46XfPivq7Of/ZgfIUEsV+cc5m+dJbJvZtdArZHz3 06BavGTbUZ4HoJV+l3mmmzj2KFAKyhMhEcXzjcFE/DQkql0CBYxD83QK552p1XxU4Wqi n62aT9U8UT5InAZbjsQCxwWSkelBzKdPTs02SY8jJy9gz09cRPvhi7Uri3BuwnGiZf5J 4LxWAtaFCyJhX5su/+iX9ElRKoA/r0KSAMwoOcRELIq0KXZImfHyQfkI8KrjUMdat+Dv XIg716KcW+rLDirlKoAfUE88S6NiTiinr5KBoDFIDr+VgEupAxiwpZafZBjJNKOqmRQj j3iA== 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 ss22si2812905ejb.530.2020.07.16.02.00.08; Thu, 16 Jul 2020 02:00:30 -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 S1728269AbgGPI7n (ORCPT + 99 others); Thu, 16 Jul 2020 04:59:43 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47836 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726333AbgGPI7n (ORCPT ); Thu, 16 Jul 2020 04:59:43 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 0D4796C229E88F845B79; Thu, 16 Jul 2020 16:59:42 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 16:59:38 +0800 From: Qinglang Miao To: Greg Kroah-Hartman , "James (Qian) Wang" , Liviu Dudau , "Mihail Atanassov" CC: , Subject: [PATCH -next] drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE Date: Thu, 16 Jul 2020 17:03:33 +0800 Message-ID: <20200716090333.13334-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liu Shixin Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index 0246b2e94..4a10e6b9e 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -41,18 +41,7 @@ static int komeda_register_show(struct seq_file *sf, void *x) return 0; } -static int komeda_register_open(struct inode *inode, struct file *filp) -{ - return single_open(filp, komeda_register_show, inode->i_private); -} - -static const struct file_operations komeda_register_fops = { - .owner = THIS_MODULE, - .open = komeda_register_open, - .read_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(komeda_register); #ifdef CONFIG_DEBUG_FS static void komeda_debugfs_init(struct komeda_dev *mdev) -- 2.17.1