From patchwork Mon Feb 18 17:20:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew de los Reyes X-Patchwork-Id: 2159611 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B41543FCFC for ; Mon, 18 Feb 2013 17:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756246Ab3BRRUh (ORCPT ); Mon, 18 Feb 2013 12:20:37 -0500 Received: from mail-pb0-f50.google.com ([209.85.160.50]:65434 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937Ab3BRRUg (ORCPT ); Mon, 18 Feb 2013 12:20:36 -0500 Received: by mail-pb0-f50.google.com with SMTP id up1so1769447pbc.9 for ; Mon, 18 Feb 2013 09:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=+tHvfW+liatAoG/+hhcFKkiEq8Co0pH44lxwULZWUog=; b=BTAGync7yh2RqajouGeJe0KRtMakVIJqWqO7nWBkzt+YJDs5Nx99bVHxNYLX6zXTVa kqNj25wKE4xkte8shhkyPnmBdlNKz3AbQGMsi1OAZ4UJbrFqno0h6CfEG16GBkGoVD26 x2r+VsqgS9/oZ6FAQzkG5maEU5zsm5zCjFPXXG9sXBoUB4LT35aGMZmX/e8/vlsvYMKn /7zYVvxAKs/n4kfkfaA9katsU26UEru5aN8U9QftrM+5swAfMpkV/jYzIATgkzKs9ZuA XG6kXireImQr9lgVVgsyPeW4BJ3imjD5V/xNcor/kgTbG1Nr1ELvfEwHg5dlqBBPx+zm FuQw== X-Received: by 10.66.192.162 with SMTP id hh2mr37465155pac.79.1361208035482; Mon, 18 Feb 2013 09:20:35 -0800 (PST) Received: from cords.mtv.corp.google.com (cords.mtv.corp.google.com [172.22.73.96]) by mx.google.com with ESMTPS id t6sm104352392paz.11.2013.02.18.09.20.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Feb 2013 09:20:34 -0800 (PST) From: Andrew de los Reyes To: Linux Input Cc: Andrew de los Reyes Subject: [PATCH 2/3] HID: Fix logitech-dj: Allow incoming packets during probe(). Date: Mon, 18 Feb 2013 09:20:22 -0800 Message-Id: <1361208023-11500-3-git-send-email-andrew-vger@gizmolabs.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1361208023-11500-1-git-send-email-andrew-vger@gizmolabs.org> References: <1361208023-11500-1-git-send-email-andrew-vger@gizmolabs.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Andrew de los Reyes Historically, logitech-dj communicated with the device during probe() to query the list of devices attached. Later, a change was introduced to hid-core that prevented incoming packets for a device during probe(), as many drivers are unable to handle such input. That change broke the device enumeration in logitech-dj, so commit 596264082f10dd4a56 was introduced to workaround that by waiting for normal input before enumerating devices. Now that drivers can opt-in to receive input during probe, this patch changes logitech-dj to do that, so that it can successfully complete enumeration of devices during probe(). Signed-off-by: Andrew de los Reyes Change-Id: I2dca10a5c64f6c3e90ffb00547b47eaf94546eb6 --- drivers/hid/hid-logitech-dj.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 9500f2f..bf647ef 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -803,6 +803,9 @@ static int logi_dj_probe(struct hid_device *hdev, goto llopen_failed; } + /* Allow incoming packets to arrive: */ + hid_device_io_start(hdev); + retval = logi_dj_recv_query_paired_devices(djrcv_dev); if (retval < 0) { dev_err(&hdev->dev, "%s:logi_dj_recv_query_paired_devices "