Received: by 10.213.65.68 with SMTP id h4csp236938imn; Fri, 23 Mar 2018 03:36:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELusRvDukGdyBKp6Z7HnuG12jVTSqsQx3WGhQcSAkYvJN5+fRlTuh3pIEwcoPz3KOaTSSw5E X-Received: by 10.99.117.92 with SMTP id f28mr20919548pgn.421.1521801374121; Fri, 23 Mar 2018 03:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801374; cv=none; d=google.com; s=arc-20160816; b=D7EDy3yIVPq8b1PgRy+5MSAvYMmKn48kpaoRWCydfwfKIZA2FmPOiEfYQrR+3ZCq6V 10a0et4ENUHyUXrZS1APRARun5FU1cuzB0+22iRKZeDpc1NkUskTxOfiNQux2pXu9/+8 mpClPHth1WWiynKKJRglvlExeEHdSxpc9AGFeiKNeNDKfDuqItxDgzLyCjV2ULNe9+yl l2Dsjy97mGsVKHaPlrGhsTIsyMZm8YQkWXXilYYR+93R2KVmUCur9rOzJNMiLyprjERk pMXxkuZjJeng709hfY0TwPXSIv7BVbHrPh1UfSpRZ8QkRqkzFu6GI2D9QpMDIskuWtpc A4HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nd2QZsQl0hsGW9UNMHcC73EYoN90dIT4F4wd+3stby8=; b=Y7flvEX+RqrxGVmwThAdEWsJqN2SIMdi1Sb5uHHLA//n5nyDtNfuP97S0385EHTA6L pbX3wLDzZypiNPDuFY1uKYLs2YUp24PmQBjpzLS0G9O+rQ4lbUjneiK/W1JOy4kz9KRL 5ECVuSfh+HmXsN+s9rQ8u+hCTrQ6J/EueyqOT3t6Eh3nRa3TZiPYYf7uEv1wKrjRMCMi ed2aJD3vupuVUcuOxEHU/PLx3RpRTZas0UmUk4SGGZqkRURg7CiyOC6jlHf+cktWxNdk GJOntbGVnXmgw3FGWT6BMjDC5qUFX35xQ0mAsuF/7lSAazZUpgupaEtdvLRUz729y0rD 9PMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h68si3802846pfc.86.2018.03.23.03.35.59; Fri, 23 Mar 2018 03:36:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933878AbeCWKR6 (ORCPT + 99 others); Fri, 23 Mar 2018 06:17:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47414 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933864AbeCWKRz (ORCPT ); Fri, 23 Mar 2018 06:17:55 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CA7EEF0D; Fri, 23 Mar 2018 10:17:54 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Gmeiner , Martin Kepplinger , Dmitry Torokhov , Sasha Levin Subject: [PATCH 3.18 03/47] Input: ar1021_i2c - fix too long name in drivers device table Date: Fri, 23 Mar 2018 10:54:54 +0100 Message-Id: <20180323094248.263728113@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094248.117679641@linuxfoundation.org> References: <20180323094248.117679641@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Torokhov [ Upstream commit 95123fc43560d6f4a60e74f72836e63cd8848f76 ] 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. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner Tested-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/ar1021_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/touchscreen/ar1021_i2c.c +++ b/drivers/input/touchscreen/ar1021_i2c.c @@ -152,7 +152,7 @@ static int __maybe_unused ar1021_i2c_res 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 }, + { "ar1021", 0 }, { }, }; MODULE_DEVICE_TABLE(i2c, ar1021_i2c_id);