From patchwork Mon Dec 12 23:57:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9471603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 902D6607D6 for ; Mon, 12 Dec 2016 23:57:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 810342852E for ; Mon, 12 Dec 2016 23:57:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74C0628530; Mon, 12 Dec 2016 23:57:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 222442852E for ; Mon, 12 Dec 2016 23:57:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbcLLX5H (ORCPT ); Mon, 12 Dec 2016 18:57:07 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32848 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752690AbcLLX5G (ORCPT ); Mon, 12 Dec 2016 18:57:06 -0500 Received: by mail-pf0-f194.google.com with SMTP id 144so4988057pfv.0; Mon, 12 Dec 2016 15:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=F9yibSSSWyiud3Riq3III+yfP+/1TxxgeGzALhF1g1g=; b=aPp/JQNcX42RDRY66E7f/C7yN0fpbhnqXO5TXaypzIT+fZG8h0Vo7lhLZT7W8RFBBe 7b+Azsw38XDTnZ/Xmsq4hTsbINDjtSoZ4TFBL9NzxFMsjfm82w/pa5JlzihpY6v5qKyg 0QvsoKe3PzKSC+Q7cs7NaXz7Fqx4M0vjY5+2imsiarhl8T+1Cn93k6bW2DJ51ZjYWiHl qNy90QheA7nue1Ydtklj8BcGpwyLa9Nap23S7qRUYNCZHF6xq92iQ9Rnr+OL9Xo+9SMP btg4nsl0I6uoNWInvA8ayVVY5B5c9MWaiyHTexs/4Lt5dr0ziIex9zbSJbHB7/+vc4kq gs9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=F9yibSSSWyiud3Riq3III+yfP+/1TxxgeGzALhF1g1g=; b=ZXFZyuHyg2VQmO6wdfxcVSZTFZvHQ/rlp5u28O7ecXudl9skLEPCIdI8BdFCtrxbMt VrdAoo2jIEsp9MPKKDyJCxsaBkKd48XKODZB4Aw/eaHBOdbE8JG2KWSu1RrE1SAUsqis 9uw1v04Onon98owmFVgzRF+PdgA6k1b+pX9pCig1z7uudFsgwfoVvvssSJNwSOj1+WW6 zD3T2u47g88WCL3cOurV6TPHovBHQsrlRta9oOOpupU1PYfGM3Z0YN756NLrUvnYTXaf Ejs7nCnelBNWpeYoMEJca8ZxGkmko0MeikvjQsC9GgZ65cgHy98Ih9pAM/Ke7ZayTzrR VU0g== X-Gm-Message-State: AKaTC007XiA+77bduYjKkurW0npHN8oT8zGfSz0mQzr48ORd7hshpjyxJFd8u6vZ85V03A== X-Received: by 10.99.103.1 with SMTP id b1mr173700568pgc.58.1481587025479; Mon, 12 Dec 2016 15:57:05 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:84ca:cb68:b724:aed7]) by smtp.gmail.com with ESMTPSA id g82sm77924278pfb.43.2016.12.12.15.57.04 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 12 Dec 2016 15:57:04 -0800 (PST) Date: Mon, 12 Dec 2016 15:57:02 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Jean Delvare , m.frohiky@gmail.com, Christian Gmeiner Subject: [PATCH] Input: ar1021-i2c - fix too long name in driver's device table Message-ID: <20161212235702.GA10843@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Signed-off-by: Dmitry Torokhov Acked-by: Wolfram Sang Reviewed-By: Christian Gmeiner --- drivers/input/touchscreen/ar1021_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c index 71b5a63..89f9587 100644 --- a/drivers/input/touchscreen/ar1021_i2c.c +++ b/drivers/input/touchscreen/ar1021_i2c.c @@ -152,7 +152,7 @@ static int __maybe_unused ar1021_i2c_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(ar1021_i2c_pm, ar1021_i2c_suspend, ar1021_i2c_resume); static const struct i2c_device_id ar1021_i2c_id[] = { - { "MICROCHIP_AR1021_I2C", 0 }, + { "MICROCHIP_AR1021", 0 }, { }, }; MODULE_DEVICE_TABLE(i2c, ar1021_i2c_id);