From patchwork Tue Dec 29 10:30:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 7929451 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 82BA7BEEE5 for ; Tue, 29 Dec 2015 10:31:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 709BA2024D for ; Tue, 29 Dec 2015 10:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 835D720221 for ; Tue, 29 Dec 2015 10:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbbL2Kaz (ORCPT ); Tue, 29 Dec 2015 05:30:55 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35042 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbbL2Kay (ORCPT ); Tue, 29 Dec 2015 05:30:54 -0500 Received: by mail-wm0-f65.google.com with SMTP id f206so5443267wmf.2; Tue, 29 Dec 2015 02:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=z76D9OpwmnoKE9+VRUenbEw3XWz7TJ0CniTiQq8jBCI=; b=lx0vg/PEpXn1XFqdL+0ghHhvm2AbfX6fbyR0D2OUuKup7gw19OOpG20NQzuYux4Bob pt1bBD0JpMds3dRVxzLPGykgk44j9WzBTShx0yJ5w1m8mcfjyhVg7TzzomuyCAUXe1n8 q8VbbsL9m6aGUXJZYxpIEKFjZi/bFzWtn2NIOZZiITYSEjFfQo+oOTx1B2hTa404RFwP xRaGyDJWzajOQiQtVMX4pl7t6TtOEyNYHt5CXIzIOYMfmEuFrPC/Fv2kj/gentA3/SeV HWxTyu8m7O/P0/up9DGlvzd9Ta4e9R6e262F0NnqgG5AtKx/ZigSfup93KPr/y98OgX+ 4dhQ== X-Received: by 10.28.178.138 with SMTP id b132mr60435224wmf.25.1451385053673; Tue, 29 Dec 2015 02:30:53 -0800 (PST) Received: from localhost (port-19232.pppoe.wtnet.de. [46.59.136.193]) by smtp.gmail.com with ESMTPSA id q129sm18082040wmd.14.2015.12.29.02.30.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2015 02:30:53 -0800 (PST) From: Thierry Reding To: Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Martinez Canillas , Mauro Carvalho Chehab Subject: [PATCH] [media] uvcvideo: Fix build if !MEDIA_CONTROLLER Date: Tue, 29 Dec 2015 11:30:52 +0100 Message-Id: <1451385052-20158-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.5.0 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Thierry Reding Accesses to the UVC device's mdev field need to be protected by a preprocessor conditional to avoid build errors, since the field is only included if the MEDIA_CONTROLLER option is selected. Fixes: 1590ad7b5271 ("[media] media-device: split media initialization and registration") Cc: Javier Martinez Canillas Cc: Mauro Carvalho Chehab Signed-off-by: Thierry Reding --- drivers/media/usb/uvc/uvc_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 4dfd3eb814e7..fc63f9aae63e 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1937,9 +1937,11 @@ static int uvc_probe(struct usb_interface *intf, if (uvc_register_chains(dev) < 0) goto error; +#ifdef CONFIG_MEDIA_CONTROLLER /* Register the media device node */ if (media_device_register(&dev->mdev) < 0) goto error; +#endif /* Save our data pointer in the interface data. */ usb_set_intfdata(intf, dev);