From patchwork Wed Dec 23 13:26:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 7912491 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@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 424839F349 for ; Wed, 23 Dec 2015 13:27:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6365A2047C for ; Wed, 23 Dec 2015 13:27:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D4292046F for ; Wed, 23 Dec 2015 13:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753751AbbLWN1U (ORCPT ); Wed, 23 Dec 2015 08:27:20 -0500 Received: from m50-132.163.com ([123.125.50.132]:49555 "EHLO m50-132.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753424AbbLWN1T (ORCPT ); Wed, 23 Dec 2015 08:27:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=HrH2BEKAXvO6awOM7h culXJyK+s2Zhkd40glqtb7YDo=; b=NxOp9pdl6jmgugnWpm7MvH65KEFbF1Eul0 ak9dV5uUEwq4aYD4nJghkfJW7ZQymy8KSWv7U2XqHI/4ynDjrQPna8HJ0PY0ilBS 0nHr1DSR/bow/SJD8DQ3Aqz8sbMcVz98u9J01Y4mPAjZ14tseU/aBdGq5iIow7z8 UWY4+qBig= Received: from localhost (unknown [116.77.148.162]) by smtp2 (Coremail) with SMTP id DNGowED5XEopoXpWlO59AA--.2310S3; Wed, 23 Dec 2015 21:27:06 +0800 (CST) From: Geliang Tang To: Jiri Kosina , Benjamin Tissoires Cc: Geliang Tang , linux-usb@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] HID: usbhid: use to_usb_device Date: Wed, 23 Dec 2015 21:26:53 +0800 Message-Id: <639acbe1bd1388d007c88b80041807c2d8f48bf2.1450876612.git.geliangtang@163.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <41e4a06ba4bb1f35c195c7ea66071953600ca930.1450876612.git.geliangtang@163.com> References: <41e4a06ba4bb1f35c195c7ea66071953600ca930.1450876612.git.geliangtang@163.com> In-Reply-To: <41e4a06ba4bb1f35c195c7ea66071953600ca930.1450876612.git.geliangtang@163.com> References: <41e4a06ba4bb1f35c195c7ea66071953600ca930.1450876612.git.geliangtang@163.com> X-CM-TRANSID: DNGowED5XEopoXpWlO59AA--.2310S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUrpBTUUUUU X-Originating-IP: [116.77.148.162] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiGQrZmVXlQGtnVgAAs5 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,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 Use to_usb_device() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/hid/usbhid/usbhid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h index 807922b..fa47d66 100644 --- a/drivers/hid/usbhid/usbhid.h +++ b/drivers/hid/usbhid/usbhid.h @@ -96,7 +96,7 @@ struct usbhid_device { }; #define hid_to_usb_dev(hid_dev) \ - container_of(hid_dev->dev.parent->parent, struct usb_device, dev) + to_usb_device(hid_dev->dev.parent->parent) #endif