From patchwork Fri Feb 26 11:53:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8436231 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 47B179F52D for ; Fri, 26 Feb 2016 11:54:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 658D72037C for ; Fri, 26 Feb 2016 11:54:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 880F520396 for ; Fri, 26 Feb 2016 11:54:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbcBZLyH (ORCPT ); Fri, 26 Feb 2016 06:54:07 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:50691 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbcBZLyF (ORCPT ); Fri, 26 Feb 2016 06:54:05 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0M8iqK-1alKAj0Y6m-00CA06; Fri, 26 Feb 2016 12:53:33 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] em28xx: restore lost #ifdef Date: Fri, 26 Feb 2016 12:53:22 +0100 Message-Id: <1456487606-3912264-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:7Tt/Ntg+3s8VfOdASfE6ySgclnTJama0DEhMkXGJTkKc8NSo6ty CMl5dPuy9T0YMQLf60A+7MqS2wKIbfHWz8sPKmPkLH/3+xD4nwFnNr2h/wc/xydsQNcsjS5 OSckSSNkdVGJR/Mmo8ylJa1uNSOX+aefdLdGfMjYNjXizCzQhuWk8VEm0exIF7nhR7/p+k2 wZkO97lF+WC+Kr2PhVhzw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Jk9aXU0/tF4=:KnTSYGjBU+J8y/vbo4jpnJ wNI3gZFtHIlWMkPJvfHNJ0j/O1+p44oskhSliGFaph78m+yYdAGeBQ8zfE1kLG/d7UxwbSjZd Dltz6WXeBuYy/Tqykk9ujsipg36d4cJUvNrMuAILOrjLplV5zsLP+bQozOYFGjPGbsAW0lX7m ENo2gu0lg0SC87fO/5NGKU9ZLO5M76MhXqqGxS6AE1nr6RDF+RWQo5DKhgx1bVJfYQ55/6kvs nufLhjir3ZvwQPPI2Zw3WoCH0FYMGHjVD9fUGSYm47x4+X22bfoYNzpeRtpMd4Jc9N3yXu2UZ U8oAevx294I+OqwFIcf6g50xWxqYfSJoDBvKh6UsLrH6DzDPYlSo4j1EDjBixEQ9de4mNGRpI Q76AEZc2gP2xcoKsHuQ5q8JkSgcibZxTsXTU14bB/kz0OdO/OwSx0MyzdSsM8PNBvogbEbGuI eB19oUL6kIueVme/BkjUCKFTBWiGgMxy77Km5kbzV9cCNrhUsPanUdjSli6wvR1oFcDprDf2Q xJ/qE8zuNNSIc/A+at02ccMqC0XoaXUfsCLuGOK+seY6F/B43RI8tgfuRr7/Sy7JIWhdcu0GM 73RhjlUQQtAFGKu2qKJo3fnc8P3XsIzoEHRt6xayT2Het71IfXm6zn+J4KIHAImnQujcfmaeT LsTNiakor1vISjLTjj28dlE8Z6z3AVb9592VtLLhBJSQRLBouiCTyT8FdsfogGMp9oRI= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cleanup that changed the em28xx driver to use v4l2_mc_create_media_graph instead of its own implementation causes a build error when CONFIG_MEDIA_CONTROLLER is disabled: drivers/media/usb/em28xx/em28xx-video.c: In function 'em28xx_v4l2_init': drivers/media/usb/em28xx/em28xx-video.c:2717:38: error: 'struct em28xx' has no member named 'media_dev' This puts the new code inside the same #ifdef that controls the presence of the 'media_dev' member, and that the old code was in. Signed-off-by: Arnd Bergmann Fixes: de39078779cb ("[media] em2xx: use v4l2_mc_create_media_graph()") --- drivers/media/usb/em28xx/em28xx-video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index f772e2612608..44834b2eff55 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -2714,12 +2714,14 @@ static int em28xx_v4l2_init(struct em28xx *dev) /* Init entities at the Media Controller */ em28xx_v4l2_create_entities(dev); +#ifdef CONFIG_MEDIA_CONTROLLER ret = v4l2_mc_create_media_graph(dev->media_dev); if (ret) { em28xx_errdev("failed to create media graph\n"); em28xx_v4l2_media_release(dev); goto unregister_dev; } +#endif em28xx_info("V4L2 video device registered as %s\n", video_device_node_name(&v4l2->vdev));