Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5951743imu; Mon, 21 Jan 2019 00:09:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN4MzPkEx3LT/lgkcYoKPgIwws1qhE/pUVUwZyyxGvyM20P1VbsesDLg8iSNIY6KirBNup1w X-Received: by 2002:a63:7b06:: with SMTP id w6mr27163307pgc.288.1548058184744; Mon, 21 Jan 2019 00:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058184; cv=none; d=google.com; s=arc-20160816; b=iOBqAEMfrST60mfRU/8fG9/L613ihQpFBqrdTOFDDULayXWbg61VqPSYh/ulSwynQ1 mNXfWLBNNGZPVu0ZOmH65a3FT0EbZBv61nR0+9oXS8vXqu7m5k6h4fQFZOz1tfEHvPQh aKfFI9XF7EXzhoIR+2sf75FSo6CSgGGiB2NQ20bga7F34QfEcFtwVahuRM7ZezlRKFA4 NgrFzNv/V+AuN1Jcgz6WL1qBU2B69JS9+9TbTM7LqiM9KX03IydpGZez6EI8Xzzxsi0v RdR4DM1Gc3rdu9Mtd9pgkJyXlFOR77aNGrqkdSTNBOJsQQ+xaiWxgb5r1oAXukApn05r NWdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IZ8DqeZgCLk2luEgqDhOYXOdPkMHM8mbT74MxF2Oo8Q=; b=nVUKeEZiD3+o+jQ3/Lx1NY2EJrXaJccTQ7h1fl057u05dNWwtkJ1Rv4xmDkIBuy/3R 8Ly4jATVMTPdFXabWI0VkprcS8MQUUPODZz+2m0+PE4gYx2zB4UyTW2dZk0DOun9tU+Z ADrjerrxZdsv0twuuZaoCKnm4am//0eylwZrpWSuWctYpPmJdjjeAyjYEg1jQkVMMbp+ disRm2licM0dgWdSLveyPf4XZCxLJL7XYuV35Dj4FGnVjjhayWtJO2fhINGVLPPyOCl2 zlpJ4A1OIkwjjYVaiGHiZyfjkYRqhwTbfOD3GQ5ZBrXzCvVAcCYvYOq7POwoVwpycoDP GNRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xhf4SW1O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si11199220pff.272.2019.01.21.00.09.29; Mon, 21 Jan 2019 00:09:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xhf4SW1O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729226AbfAUIIB (ORCPT + 99 others); Mon, 21 Jan 2019 03:08:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:49994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728639AbfAUIH7 (ORCPT ); Mon, 21 Jan 2019 03:07:59 -0500 Received: from earth.universe (unknown [194.136.232.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D78421783; Mon, 21 Jan 2019 01:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548032491; bh=WoXqts8Zyyj3IcCcrBeogQKzogQyA/qUsPtodKHtexM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xhf4SW1OsEEMgUedcEFUIjJ5Fm7zk/nIfjJafYfyIFqX8y+GTazmqNSdOUJNETNyn 3YMqgToiLxsLCne4WbHa2KAOvMxxhlVLEzAPogVw4HtLrKG3uTu44QIDpgkFLGTjcG GqbqP7eaCf03iyiH9uwHPQKJe9bdD/i7vXojLw/k= Received: by earth.universe (Postfix, from userid 1000) id 362FB3C08E2; Sun, 20 Jan 2019 22:23:26 +0100 (CET) Date: Sun, 20 Jan 2019 22:23:26 +0100 From: Sebastian Reichel To: Yangtao Li Cc: hdegoede@redhat.com, wens@csie.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] power: supply: axp288_fuel_gauge: Change to use DEFINE_SHOW_ATTRIBUTE macro Message-ID: <20190120212326.6kk4tcpzs6ytlvho@earth.universe> References: <20181122142551.25367-1-tiny.windzz@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ovmzsfkld3ku7wlo" Content-Disposition: inline In-Reply-To: <20181122142551.25367-1-tiny.windzz@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ovmzsfkld3ku7wlo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Nov 22, 2018 at 09:25:51AM -0500, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. >=20 > Signed-off-by: Yangtao Li > --- Thanks, queued to power-supply-next. Sorry for the delay, I missed this when I collected patches for the 5.0 kernel. -- Sebastian > drivers/power/supply/axp288_fuel_gauge.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/sup= ply/axp288_fuel_gauge.c > index 084c8ba9749d..9ff2461820d8 100644 > --- a/drivers/power/supply/axp288_fuel_gauge.c > +++ b/drivers/power/supply/axp288_fuel_gauge.c > @@ -307,22 +307,12 @@ static int fuel_gauge_debug_show(struct seq_file *s= , void *data) > return 0; > } > =20 > -static int debug_open(struct inode *inode, struct file *file) > -{ > - return single_open(file, fuel_gauge_debug_show, inode->i_private); > -} > - > -static const struct file_operations fg_debug_fops =3D { > - .open =3D debug_open, > - .read =3D seq_read, > - .llseek =3D seq_lseek, > - .release =3D single_release, > -}; > +DEFINE_SHOW_ATTRIBUTE(fuel_gauge_debug); > =20 > static void fuel_gauge_create_debugfs(struct axp288_fg_info *info) > { > info->debug_file =3D debugfs_create_file("fuelgauge", 0666, NULL, > - info, &fg_debug_fops); > + info, &fuel_gauge_debug_fops); > } > =20 > static void fuel_gauge_remove_debugfs(struct axp288_fg_info *info) > --=20 > 2.17.0 >=20 --ovmzsfkld3ku7wlo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlxE5ssACgkQ2O7X88g7 +ppAWA//Wxt0SzuHUUfk6z2Z1e/IO5kyxalrUCImNkjSTgb1aNxc779EHweTgpKu pGUdSiBlpPcOa8CgtozABrKlHjmmRFYWRcfVxGogZyCQBt2mQwgW/TbS3pHUN8Sr VnQrAv+cf0g3M5c6WnPguvOVvLao/zwwymvQqqDPNvoYDrrS4oOP0InlE4uhSIfP LyPToq0PkWaImWHB/mr5Y7iy79b4qkKe744nJtDlbroVSvESmktGIdQ4vaiJhc10 yvLppZMm0CmU2IrjQtNQYgnWssTRUrfZ/JJ0a8t1lT3W69n0J05X9vZrC5kGaTyD ovyixjLt8Fwcw9EZC+YlKunMoUYiUc7mD5U3ftbuxSxWbAnCds3tqiNf2XoqIkUr JYa4azZy+S9Gm1io6ySja3HSjgG0NBrkVitjSC5nqKD9S3bQY8eaUkA5iib3n5oZ UEv/0eRlfHngl+FVIBjeM1RNeRSLY/70hwON9skYG7RuA6GnYPNpxXVW0Z1WAYeO 8S+Omo01WNdu1pBwN/qqVVa8AFBH6BUXxCHObo7z6Ef0AGwZS3B0tpboe1UZuTwn F3x32rPyYG0DHVEcr5uH0FKXwfo6n9hnADoXsVFhbVdN+si3PUXvOV/EDSaksN1L Wvkcu4u+QT60Wda/tTNA542Rrhw0WFW3/4nsdWciaGZJGdznd8w= =uac3 -----END PGP SIGNATURE----- --ovmzsfkld3ku7wlo--