Received: by 10.213.65.68 with SMTP id h4csp280261imn; Fri, 23 Mar 2018 04:37:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELvKEW4M7OCNgvincTHC3uYkWM9p/qZYrTk6h90uGhf7OLpePPEobaDSN5y31E+zCnD15j/c X-Received: by 10.98.59.4 with SMTP id i4mr23816710pfa.26.1521805067764; Fri, 23 Mar 2018 04:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521805067; cv=none; d=google.com; s=arc-20160816; b=vM0vHm1NYJ03hzRCpJL1yfbPjJuErcromBicBbQIl7MZkaKNDUoV8Sq/4nYcmOl+og xm4ErkFFVhzQ6kOcm0FT3DFi6cw9VutACNOYJA1XiuzsjwQmV5s/RxNaHaYD0qZBRXbR ROz8l4ViAbTWd6rXE0EaafiGHaN8xcEHLq1+LEF4vyAf7OHMidpQsUzo0Mw+HrTsYJbP cMoXjrMc0jlzD/u4cg5PEkrKMBh5w+pq6wDH/TmTpVKoBbWl+T/hvnV51ojG1IZ2kmg3 WsvS9v/ZE7um6Fwr64nH650wYBq+m57TyXD5PZuEMCo1hH5bmuM1IXI8aZ8+Akq6fGrB g+Uw== 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=qdkyKPeLZyacCwjpl8/X4IAggl6+8+6o3Ktj7waC7iQ=; b=Tr6ktvt0JOJhShtlW2vwgJJufD6UlZ08qx1yfo4e0aa5BpeOA1E3BPHARMRsnfo1pM MAngMjY3K2hWHcFpjv5qe+PIh1gkLXwOrd0LCBFj9Lveu6eGKiToKtVj3ZYGteI/FzNF hrFv9/nd+wU7msKhENwZIL3WY1D7Ha2AwOQ2mXiBsJK81lBwHlAJj5eSBomc0uApbR1S Ochqz5CsepnQWUJD8bHtRlFE2aOzFI0BgswSdZOyyvVHcIoXFzO1YfZ5HSoH5Vwuue35 8Beeb4mMha019Sy91KkTSIl/2ulvxWsNu5TIJZHuTstv5CgjyUepQRkGYCuQhwUnQZme hZTw== 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 h22si2422439pfi.245.2018.03.23.04.37.33; Fri, 23 Mar 2018 04:37:47 -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 S1754869AbeCWKFC (ORCPT + 99 others); Fri, 23 Mar 2018 06:05:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39432 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754854AbeCWKFA (ORCPT ); Fri, 23 Mar 2018 06:05:00 -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 9347913CB; Fri, 23 Mar 2018 10:04:59 +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 4.9 014/177] Input: ar1021_i2c - fix too long name in drivers device table Date: Fri, 23 Mar 2018 10:52:22 +0100 Message-Id: <20180323094205.831606458@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094205.090519271@linuxfoundation.org> References: <20180323094205.090519271@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 4.9-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);