From patchwork Tue Dec 23 20:48:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 5535411 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B3A08BEEA8 for ; Tue, 23 Dec 2014 20:52:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1F5220121 for ; Tue, 23 Dec 2014 20:52:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E5BC2011D for ; Tue, 23 Dec 2014 20:52:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756693AbaLWUwE (ORCPT ); Tue, 23 Dec 2014 15:52:04 -0500 Received: from mail.kapsi.fi ([217.30.184.167]:57561 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756543AbaLWUu1 (ORCPT ); Tue, 23 Dec 2014 15:50:27 -0500 Received: from dyn3-82-128-190-202.psoas.suomi.net ([82.128.190.202] helo=localhost.localdomain.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Y3WPS-0004tE-0e; Tue, 23 Dec 2014 22:50:26 +0200 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH 01/66] dvb-usb-v2: add pointer to 'struct usb_interface' for driver usage Date: Tue, 23 Dec 2014 22:48:54 +0200 Message-Id: <1419367799-14263-1-git-send-email-crope@iki.fi> X-Mailer: git-send-email 2.1.0 X-SA-Exim-Connect-IP: 82.128.190.202 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false 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, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Top level pointer on USB probe is struct usb_interface *. Add that pointer to struct dvb_usb_device that drivers could use it, for dev_* logging and more. Signed-off-by: Antti Palosaari Acked-by: Hans Verkuil --- drivers/media/usb/dvb-usb-v2/dvb_usb.h | 2 ++ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h index 14e111e..41c6363 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h @@ -354,6 +354,7 @@ struct dvb_usb_adapter { * @name: device name * @rc_map: name of rc codes table * @rc_polling_active: set when RC polling is active + * @intf: pointer to the device's struct usb_interface * @udev: pointer to the device's struct usb_device * @rc: remote controller configuration * @powered: indicated whether the device is power or not @@ -370,6 +371,7 @@ struct dvb_usb_device { const char *name; const char *rc_map; bool rc_polling_active; + struct usb_interface *intf; struct usb_device *udev; struct dvb_usb_rc rc; int powered; diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 1950f37..9913e0f 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -868,6 +868,7 @@ int dvb_usbv2_probe(struct usb_interface *intf, goto err; } + d->intf = intf; d->name = driver_info->name; d->rc_map = driver_info->rc_map; d->udev = udev;