Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3494873imm; Sun, 16 Sep 2018 20:21:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZB0AfTbet8vgsyFqMMpxi5PvknWq/bhgJ5cvG9Y481akaEdMoQaltU01926jdGEZwDy0gV X-Received: by 2002:a63:f:: with SMTP id 15-v6mr21964066pga.430.1537154518876; Sun, 16 Sep 2018 20:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537154518; cv=none; d=google.com; s=arc-20160816; b=Gczh8bPafXK4mRXLmO3eMgPuGsSMhQJRFxKCrEcC0cPfUGevCk2itGESjOtZ9Cl/IQ 9u9HDOYLl4TvME2Y0NP2GDhKozZsOiSIuge080rtaavoaDHx/a7J/yw0xcQwCJQ7sObA WvxyD1E5p+Wd+ulJkNRc+OiG9H3ne99r6L6qhrMy8o/U0ffWc2wz9U6m/EepjXBjYk2v WNyNGlI5xR/TgRBX9LZQbjg69e13oPb6UYJEJTAfUcQDdAAg9hWYg7G1IblODTQxZU21 1fpgLHbZz6gWquY1meB7mrSl94YAUaiYrLIltqrEoRSqXGCvCgYK1bjKUnGBfz8jVe27 bdYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=fB+9qanTmXVpv9EIlmlJ05nhP2EcTnlA7tclsOJ+82Q=; b=f9o2+GWg54rpeBMTNHGQJ/IkhR8gCotNJSpuJqlUM0G7pJCcpKSerqqZU85yt94+k7 krPagHDJxaOJN3PHriBUdGwRyT/YCChLnLLB0YsOLQdRYQ9Sde/Npz2lV1EJsvnFT7c0 o9IgSGAboe+9rp/vcnIW2fNFOxd3g16h93AzzBbHrxtJRbxkqRMs1M2pBONkNt5TNe4c c/6boy2dbLj7eUCG850SW4M78BunvLv7bxmTyzgrHJAsf2jUUXFJizDVE+IOYZxL2+go udW1N7xbVwJ1ofDegdozwpwo56F+pgzz+pqchjWCwTSwD7dhZeWKDfLDotayOkW8WVkI 4rgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=BWUitNC3; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g66-v6si14847657pfk.53.2018.09.16.20.21.43; Sun, 16 Sep 2018 20:21:58 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=BWUitNC3; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730295AbeIQI3n (ORCPT + 99 others); Mon, 17 Sep 2018 04:29:43 -0400 Received: from mail-dm3nam03on0110.outbound.protection.outlook.com ([104.47.41.110]:11424 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730190AbeIQI3n (ORCPT ); Mon, 17 Sep 2018 04:29:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fB+9qanTmXVpv9EIlmlJ05nhP2EcTnlA7tclsOJ+82Q=; b=BWUitNC32SKxzLr5PDKruU/r/m+sm1XmqQY6l+kizIrZSIzcE5KFPdgJJrZWS0pfebM7RQmp+4HzSLTs2sY4FanzQw+rEkRSRCFW4h3x5uqLSJydAvilmoRwZ5sY64MtvNoRa2hAqx2p6VzelhDqogbuWkCxl9vQWDWgmCbelcE= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0774.namprd21.prod.outlook.com (10.173.192.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.5; Mon, 17 Sep 2018 03:04:21 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:04:21 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Akinobu Mita , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL 4.14 53/87] media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power Thread-Topic: [PATCH AUTOSEL 4.14 53/87] media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power Thread-Index: AQHUTjLv2Xaxk5PkYkythOIzWxce2g== Date: Mon, 17 Sep 2018 03:02:56 +0000 Message-ID: <20180917030220.245686-53-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0774;6:vXwWDyhNp4nJLf9obq64dv1Hcdhzj48a4kF1UXSK9DZXbVYgb2Bp00UFPJu37Qtf+expOVyyhPcgXyPEpjW7uDUebvvT4T5BcuvbOR+U/kyzJPc/sLlFA79EIjOc86lIgzRsPOKptUIFi6siVdxQptvhAYWwY1lQ0etKy/NA/GnfU8RDBarrQ9GyOsiUHu31XjG5XJND92lmoF/hKZiXOFgyfRZH6sADstcuqsPl0gRezacEvuXv+agtLKsPnTvHA8hysc9y+hwpcDjku4M+jJ3bABsa8rVZ57lYMQVqBjyfAFvk2thhHrdQRWwDbpAHgBAAM4CR2cR/BitQVOwXkU2WLYDACJCDynDfLbOtMXOAHQGIwIfQsiU5G1vdlquGIS0enlWGxmjegozCou/hsWS2uXWoKXMWfV2MkzWYhZwHMSxibYv58D2h1otwNvjjabkcBtO37Wpf3Tv/rrTefg==;5:ESLwCS7G02dKLJ8/9gJl8hedn/Jv4tRwrohd5tsz5n11CGHJwcRho2Qe1yFsSKCjjJDtf6PPBDgi+KitrKrLw+JMxMXMzaAEFFqSFB0ZF1oZ74y3wcx0YPym5//4+8sfl/lHRk8HiFREJ+oTvzgPpfBqo39QmKt1ucMR/cEv1RQ=;7:gIGS42ENhhARvPQCyM6WEqVUVxR/gupLi0VvSMr9ORr5u0Qy9L0fC7OZuZf2Q9EyVh78dP3NencBD6HJYi9QJ+Bo1L6msG1P8avfHkqromqi+FwkGfWey6KpH6s9xkJzG47LWf7E4vyJhe3NPbSvPfztMZCWMMvqfLKXj953aUvrTksyRuqD85TMm3mGoWHBrFLRAD++vsEEiaCVJgcyWwaW8/Xi4d0uGvU06nuOMT1KZ53BJyyA2fbjeD9sjQVn x-ms-office365-filtering-correlation-id: 5b85516d-80f4-43a6-b309-08d61c4a43cb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:CY4PR21MB0774; x-ms-traffictypediagnostic: CY4PR21MB0774: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158)(95692535739014)(228905959029699)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699050)(76991041);SRVR:CY4PR21MB0774;BCL:0;PCL:0;RULEID:;SRVR:CY4PR21MB0774; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(376002)(396003)(39860400002)(346002)(199004)(189003)(54906003)(105586002)(316002)(4326008)(6116002)(1076002)(14454004)(305945005)(7736002)(22452003)(81156014)(66066001)(81166006)(99286004)(8936002)(15760500003)(8676002)(3846002)(478600001)(72206003)(53936002)(10290500003)(68736007)(106356001)(6512007)(25786009)(76176011)(110136005)(11346002)(476003)(2616005)(446003)(6436002)(486006)(39060400002)(6506007)(86612001)(10090500001)(102836004)(86362001)(6346003)(186003)(26005)(36756003)(97736004)(2906002)(256004)(2900100001)(6486002)(217873002)(107886003)(2501003)(6666003)(5250100002)(5660300001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0774;H:CY4PR21MB0776.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 0F5hFyRKwXj7MOA+gH1xA3XCEgUvsATDTOtiZ067ffHHhtZP+PWpfcyWrmqgiima7PwbrVDeNyx4+3uBunSHBsSGhPjAUgu9PKKk4PpMZuTCBJcW/HsjaNdhuvMbgsoBKqs8N/1d1s5Mz6VN389Fh2tehgmbcnuyDNNJVsBSdZIiBcStwxCc8fgjtp2VIVQ1RFelwfy6oGwqPZQzQPl0ttBLni8VvdCxG6XPNBiuisP6oZXqcxxmBadzifFAiAlZktPTLDW1r/wH7rqpjwIXwQys5MPV5h1ZJNu1sjD0eD902bZ9+zu7HoBovC9gm+u0Stv6M3dvtrucslHaMTknVCGI7XWkaeCV1EhfJTlIHnA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b85516d-80f4-43a6-b309-08d61c4a43cb X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:56.8373 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0774 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Akinobu Mita [ Upstream commit 30ed2b83343bd1e07884ca7355dac70d25ffc158 ] When the subdevice doesn't provide s_power core ops callback, the v4l2_subdev_call for s_power returns -ENOIOCTLCMD. If the subdevice doesn't have the special handling for its power saving mode, the s_power isn't required. So -ENOIOCTLCMD from the v4l2_subdev_call should be ignored. Cc: Hans Verkuil Signed-off-by: Akinobu Mita Acked-by: Sylwester Nawrocki Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/s3c-camif/camif-capture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/med= ia/platform/s3c-camif/camif-capture.c index 0f0324a14d51..85d26713cedb 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -117,6 +117,8 @@ static int sensor_set_power(struct camif_dev *camif, in= t on) =20 if (camif->sensor.power_count =3D=3D !on) err =3D v4l2_subdev_call(sensor->sd, core, s_power, on); + if (err =3D=3D -ENOIOCTLCMD) + err =3D 0; if (!err) sensor->power_count +=3D on ? 1 : -1; =20 --=20 2.17.1