Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8268008rwi; Tue, 25 Oct 2022 04:47:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5v8FIk6W8UV/Hx0zHoJ61ICaHqwwFIVIOXulnWvF04susQ8E+jExzrVsuOFAiATvkUnXEH X-Received: by 2002:a17:902:ced1:b0:186:b18a:d0d5 with SMTP id d17-20020a170902ced100b00186b18ad0d5mr7599607plg.60.1666698454805; Tue, 25 Oct 2022 04:47:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666698454; cv=pass; d=google.com; s=arc-20160816; b=Qj2XixNsL5w7SR7Ni5DfF6TywcwfgYEegd+0Y7nqjFPVCzNbJNkwIrMf0J0d2s5wo8 0DCFUepw6HCmym9SLDP66cOg11Q0yRifLJZvLJnmCs135oaa+eyOFlEPB87wXaBk2qbH ZYbnozRN3eiY+3KSXlsJWP3lA1zmhz0W7jyL67iLrjxDDn3NzdBx7Any7nNxuZlhuK2H 7bFzUpFu/Sx0ANUUnUz+Tqbi+jeuJ48Utd9wDAjMJZEuwlC1joNFZ5Y1EzN5taCA+T3u l/s7LdiN9XmsO0OvZ0vfrFlNEtIcQQUurzrItS7Rher7Z4sHMv0xVxfBqCDx7gr2/t9G Vq3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pIy5CC4MQIyCvYcEm0XYoddACRXHkrXTjOrrA/K9QYE=; b=1KTpVQPYuwQ5lP87ZfV0qXXgvffJSizeWpwFw3sOQxYims0e1jo9Y0XYI1CxUAiyX/ ZZ6jJrkhGHmeVDbnRERG5P65O2TpluKh5UCCs78y/QOYpNpALSUc+osTmg/EBzl3TroM jvVHBa1ZG63BTZHosjM5BitXSIb7hH5UnwDq8FVIcQctrfdJveDeyCHQ+8hf2eVJIGn2 lM/rQvtQVaPu56/Of5ucAy6fKN5Lr/b3exM1Khqm2goOzGMyRgOzMB9DdoABMk8EPDXN soLGi5nL3gwjOOYLk+zYrq1Vdm6tXzNug+BYbWc0BwKm5S1P/NlYfr4l7L3juICmfJmw PPRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=pTmZrhSn; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a056a00150800b0056b94c5af48si3359138pfu.307.2022.10.25.04.47.22; Tue, 25 Oct 2022 04:47:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=pTmZrhSn; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231688AbiJYLeM (ORCPT + 99 others); Tue, 25 Oct 2022 07:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232404AbiJYLeD (ORCPT ); Tue, 25 Oct 2022 07:34:03 -0400 Received: from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D804E127BD5 for ; Tue, 25 Oct 2022 04:34:01 -0700 (PDT) Received: from hillosipuli.retiisi.eu (82-181-192-243.bb.dnainternet.fi [82.181.192.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sailus) by meesny.iki.fi (Postfix) with ESMTPSA id B5ECE20191; Tue, 25 Oct 2022 14:33:55 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1666697635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pIy5CC4MQIyCvYcEm0XYoddACRXHkrXTjOrrA/K9QYE=; b=pTmZrhSnj58/dr2jl521atuCBRCfAnKAxSis6SF0Kge3DDdCwZUwoacZ1C3h6+XztPvIHf eLywiBn6q4HPE+8V8gJFc2SVFR7blhUE5342zkMRMLTMqNtKp3CjTvzDkm8mxo/VoFkwM+ u3+pedgC2Y1LDuNd5EiHBLg4vgE8x/s= Received: from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.eu (Postfix) with ESMTPS id 028C2634DB0; Tue, 25 Oct 2022 14:33:54 +0300 (EEST) Date: Tue, 25 Oct 2022 14:33:54 +0300 From: Sakari Ailus To: Hidenori Kobayashi Cc: Dongchun Zhu , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] media: ov8856: Add runtime PM callbacks Message-ID: References: <20220921092417.2579126-1-hidenorik@chromium.org> <20221006095846.pvhmis44z777fnsl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221006095846.pvhmis44z777fnsl@google.com> ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1666697635; a=rsa-sha256; cv=none; b=YXSQkgaqyTOgx3io6Wq1NwIHki44WyZYYqNgZpb/ktbvs8hq3zEmDJN0WzxSzVANEIENMt Tc/gKaRmu3E2JyZ+nndrHdH/mFsFGk9NeDX5bDzaZQrs18ru2vZ43/N+R6F8K2/5fozC4h QEL77Mlsqk926dkU26YF9wPmfpVBK5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1666697635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pIy5CC4MQIyCvYcEm0XYoddACRXHkrXTjOrrA/K9QYE=; b=Y8K93OWP+gxqN7YeeRGg/5auGyciLdKRBaIFwaO+S8oO8U2gZG35cxDvU3AicPVeAUkHXg 8+daG4MSDJfQv+Mog3hhXsK363OfztURyznT2pu4rAnbtrIf2BI7irVRwE7iL38jOtwOvv ErL29Wnv1JP9tgejCmph7XAoIDohJP8= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hidenori, On Thu, Oct 06, 2022 at 06:58:46PM +0900, Hidenori Kobayashi wrote: > > @@ -2148,17 +2149,20 @@ static int __ov8856_power_on(struct ov8856 *ov8856) > > return ret; > > } > > > > -static void __ov8856_power_off(struct ov8856 *ov8856) > > +static int ov8856_power_off(struct device *dev) > > { > > - struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd); > > + struct v4l2_subdev *sd = dev_get_drvdata(dev); > > + struct ov8856 *ov8856 = to_ov8856(sd); > > > > - if (is_acpi_node(dev_fwnode(&client->dev))) > > - return; > > + if (is_acpi_node(dev_fwnode(dev))) > > + return 0; > > > > gpiod_set_value_cansleep(ov8856->reset_gpio, 1); > > regulator_bulk_disable(ARRAY_SIZE(ov8856_supply_names), > > ov8856->supplies); > > clk_disable_unprepare(ov8856->xvclk); > > + > > + return 0; > > } > > > > static int __maybe_unused ov8856_suspend(struct device *dev) Applied with the following diff as the remove function's return type is now void. diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index 9e1361eed91f0..cf8384e09413b 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -2456,8 +2456,6 @@ static void ov8856_remove(struct i2c_client *client) mutex_destroy(&ov8856->mutex); ov8856_power_off(&client->dev); - - return 0; } static int ov8856_probe(struct i2c_client *client) -- Sakari Ailus