Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4339447ybt; Mon, 6 Jul 2020 02:03:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdIH/e/DR+2jHj/g2KTAhjApXDnVQO2k5LxGzxgDpZynzgCHbOZkIG27fPw9hXouollYXU X-Received: by 2002:a17:907:9c6:: with SMTP id bx6mr42450161ejc.43.1594026223537; Mon, 06 Jul 2020 02:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594026223; cv=none; d=google.com; s=arc-20160816; b=G5xkAe0AjCJA9XS+gk/DyspT6Wfk51/gimJ7sYc7aS44ilkxV77c2rA2vOXSMT1hm1 MABHlJ0MSuLZrQALRuqQxkMsbuhgPz/SCgHvmF0T0mfpHSSBia8a4NZWPBfampvjsJoH uwjrPZdElM+Bxg24cALEGjqVhGnWUzbav6H+745Pp30bt9yYEFZLdrT1Yxdp2lrXQGtF FgjmfOTKybIe+ldQGyIiKlyFaKYMqZNIBhbyojaWOnbnlLOuwOI/U9wZV4LpZH0eUuYQ KD1RFWN7z0teiaPZj2nnsJjHRP7/qmkk4GQKdbXh5tkwmdXSugE0E1ga+3hEVc36lBY+ 8YFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=79V/Dr6EngDKQU6P4WXn8LfzcC8aD1Js9yoSY0SqAVs=; b=jCL3ijh0Zp78fw/6UFWNUBjSjpj4yirKEKx7gx4ayVr1sOGbGcr0vr2k4memNmXZ8H 9gFDI/uMvcsZy8pirdR93MJz2/MqgIDpoDvts8TuIm/hOGYboZWBey8HYlPQXh0rHRFK 7sfMtFNNBnECdKvOrem9kuBIQyL8ACtBW5fUfNOyHaqU2v1nioTozxpbaN6vkcHj3o/c pxRx1MTLKeXqc9k4ZaSwqX1vjqfe/TxKoGENQeAoKqNgl3IbrZ0e/tbWQd3D/1j7c1QT MGpr94XiMeZRbOrbY7y1yyarhUMmRqfW2FXNI+NjJA39bWHwMsCX4/oHlv3o9DjKDVzO djxw== 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 dp11si18531318ejc.463.2020.07.06.02.03.20; Mon, 06 Jul 2020 02:03:43 -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 S1728594AbgGFJA7 (ORCPT + 99 others); Mon, 6 Jul 2020 05:00:59 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:49139 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728183AbgGFJA7 (ORCPT ); Mon, 6 Jul 2020 05:00:59 -0400 Received: from localhost (lfbn-lyo-1-23-225.w86-202.abo.wanadoo.fr [86.202.118.225]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 7A35120000D; Mon, 6 Jul 2020 09:00:56 +0000 (UTC) Date: Mon, 6 Jul 2020 11:00:56 +0200 From: Alexandre Belloni To: Dariusz Marcinkiewicz Cc: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl, Mauro Carvalho Chehab , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Jonathan Cameron , Dariusz Marcinkiewicz , linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: cros-ec-cec: disable the device wakeup on remove Message-ID: <20200706090056.GI6538@piout.net> References: <20200706085240.1979622-1-darekm@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706085240.1979622-1-darekm@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/2020 10:52:38+0200, Dariusz Marcinkiewicz wrote: > The device is enabled for wake up while the driver is loaded. > For symmetry, disable wakeup when it is removed. > This is not necessary as it is handled by the core properly. There are currently 73 calls to device_init_wakeup that are not necessary, this would add one more. > Signed-off-by: Dariusz Marcinkiewicz > --- > drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c > index 2d95e16cd248..3881ed7bc3d9 100644 > --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c > +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c > @@ -277,8 +277,6 @@ static int cros_ec_cec_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, cros_ec_cec); > cros_ec_cec->cros_ec = cros_ec; > > - device_init_wakeup(&pdev->dev, 1); > - > cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec, > DRV_NAME, > CEC_CAP_DEFAULTS | > @@ -306,6 +304,8 @@ static int cros_ec_cec_probe(struct platform_device *pdev) > if (ret < 0) > goto out_probe_notify; > > + device_init_wakeup(&pdev->dev, 1); > + > return 0; > > out_probe_notify: > @@ -335,6 +335,8 @@ static int cros_ec_cec_remove(struct platform_device *pdev) > cros_ec_cec->adap); > cec_unregister_adapter(cros_ec_cec->adap); > > + device_init_wakeup(&pdev->dev, 0); > + > return 0; > } > > -- > 2.27.0.212.ge8ba1cc988-goog > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com