From patchwork Sun Jun 10 15:42:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10456693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 066E660234 for ; Sun, 10 Jun 2018 15:42:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8FC226E54 for ; Sun, 10 Jun 2018 15:42:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA7D126E69; Sun, 10 Jun 2018 15:42:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78CEB26E54 for ; Sun, 10 Jun 2018 15:42:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753532AbeFJPmQ (ORCPT ); Sun, 10 Jun 2018 11:42:16 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38800 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbeFJPmP (ORCPT ); Sun, 10 Jun 2018 11:42:15 -0400 Received: by mail-pf0-f195.google.com with SMTP id b74-v6so8944569pfl.5 for ; Sun, 10 Jun 2018 08:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=S/VEWzObRj22HOzIAfDFolVlYnZR8dmwHPB5O3/RBWU=; b=Yo4QTuOvoz5Y8Fdk/P09Or1mAC4QHDnzcOYWMNdavqYUZdsaPOJ8E59geW2PFpo58e cVhr4Puqy2nqejE2w8bI0lWZfCvyt19NYE6XBz7gSzZC+sLeUoFMvfPU4wVTU41h7vqe FHiNCTyp/v6U8m1Qrwx3sWg7YaF7I5WOOr+EJFMODkAvhgZ49laMNc588rknVMaSxszy L/5i/4ysAuDi4kdgCzGODTc4ag+Z6jJlcR1gTc9cNuq6Qod/POLN5qlhbdotmti/2N2B dhI2iPwjQ8F+nBgd+qq4JkWNA44io5q2Q2Dw1Ii5HOymcX+M1lZ5ig6qXbGMzzo9WfJ2 bBIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=S/VEWzObRj22HOzIAfDFolVlYnZR8dmwHPB5O3/RBWU=; b=U6oSKnfHJSNIkpijkvLfcCA16fcCOiBfZJqP9ayVVOJ0qW83SWc3FIT1+NjhiQm+VG WcjvSYpvTfpjMOLKVNTXOexL81+HhYpIDWirWvu47MeEEOvaVMBOlrDcCl6tQYDz0y3i 0qCNlvrwAT++D0G8YHOtxOdfk1FT28cJqAUW6GJyDT0/PUQePgsL3F7Yp0/VpRyIMPGa jTSWzjvp2tUsmu7mUfZSHX5Pps+z7dTm5zkvadRzcWGMbjrgCnnl03MCGt9v04OVNAZt MKNJYSjk2Khy6q5o7ODYdC+Xr7yX8cL04KeixOFg1CjSe6UNtz3LjkR+SrQEX80lQYS+ CYlg== X-Gm-Message-State: APt69E02F1OnvOTIAk24qXAU5P8FN21w8R0YHQUXqp63N0Hg9071jsRd 9hA4a+yVgEmLE2crpbM+sjnuzg== X-Google-Smtp-Source: ADUXVKK3cgAOQ5WEAISXknAM9zMxTncRzRFVy0PRp5pdguCOM3bdoXL+d/Cs7mZ9uifREzCp3Kxg7A== X-Received: by 2002:a63:40c7:: with SMTP id n190-v6mr11981697pga.248.1528645334744; Sun, 10 Jun 2018 08:42:14 -0700 (PDT) Received: from localhost.localdomain ([240f:34:212d:1:31d5:b0e6:bad0:c2da]) by smtp.gmail.com with ESMTPSA id z16-v6sm75312505pge.90.2018.06.10.08.42.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 08:42:13 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sylwester Nawrocki , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH] media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power Date: Mon, 11 Jun 2018 00:42:01 +0900 Message-Id: <1528645321-19020-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Sylwester Nawrocki Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Sylwester Nawrocki --- 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/media/platform/s3c-camif/camif-capture.c index 9ab8e7e..b1d9f38 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, int on) if (camif->sensor.power_count == !on) err = v4l2_subdev_call(sensor->sd, core, s_power, on); + if (err == -ENOIOCTLCMD) + err = 0; if (!err) sensor->power_count += on ? 1 : -1;