Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3512404yba; Tue, 16 Apr 2019 12:59:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvQ615fAX6DWTtqzGggN6ZRjmF3WUroxZRWOUPxHZH7B1bZl8bbL1kBX8nfff/WNSyvxSp X-Received: by 2002:a17:902:768c:: with SMTP id m12mr83558074pll.160.1555444762287; Tue, 16 Apr 2019 12:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555444762; cv=none; d=google.com; s=arc-20160816; b=gjE92+0Cev2U4aHocWSYN9xnMEaYwwy5M4lL/ywPKlvAlM8JJJOoHyFV4OIMDYE3Ct s+wxkXuUIXWkct9O0o1KU+OHMDC59xtX/reIxG2Mxl+6SUp8i726p29C/kx4zIYSFP36 QLF2JBgakX8hlnLFnhreqvxpdokiFJPHw9MD5UbLs2sEt4QnsiCBBui5FD6WiX5KNdbr ZVP7Evw4BrjWr9MOCMuj+G1cTzVMKvdbmbNPu17kFs/0c7rLo/I4E5etWGjiw65YlJZk xg5sz7Icpyqh2ComYpLsT53PA9I6K/AaENUNC+zKjiWAkqGGdufjXN+fn3HIeCHffOnb wlaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=YOlZmPRtrSowI58H1EX8ZVNLEpx5eIWiJlwI7vXCFqs=; b=ONPO5y1DdWK0EDdqk51To4jcCBPcA9b1O+wmh4RQIBfKH2w+EQi/CY8BMxinQZkZfC phVgDOrWfS/S+K4gnZm6PKa8Eq9GQyKtQHKkrGnZMRXwVnjiUXal1mp3hLtOC+O8Ca6t 7eKSbmUQzc0uo2OAleAaukPHHNIfn1lQBvs5mKlH6VFQUJpCzjIaAlocFztlZ3oD+WUN ErLz/2v8rx1gLQRihy4mcYwVzyZgQjuH1uA67Otnzmf9rb4tFg7oBiwkscrFdCfZnl0S 8fsHX8DR6CbM/R7nqzdxU109h335Y4fXe9tZfKiG1bAQyk2XpbfTQq0aTShHKs3TDKE0 vxrg== 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 l18si39280193pfi.117.2019.04.16.12.59.06; Tue, 16 Apr 2019 12:59:22 -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 S1730476AbfDPT6F (ORCPT + 99 others); Tue, 16 Apr 2019 15:58:05 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:50773 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728734AbfDPT5m (ORCPT ); Tue, 16 Apr 2019 15:57:42 -0400 Received: from orion.localdomain ([95.117.99.70]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MmD6U-1gYajk25yK-00iCtf; Tue, 16 Apr 2019 21:57:40 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org Subject: [PATCH 2/4] input: keyboard: gpio-keys-polled: use input name from pdata if available Date: Tue, 16 Apr 2019 21:57:23 +0200 Message-Id: <1555444645-15156-3-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1555444645-15156-1-git-send-email-info@metux.net> References: <1555444645-15156-1-git-send-email-info@metux.net> X-Provags-ID: V03:K1:0DjkhHxOiFXi9R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.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of hardcoding the input name to the driver name ('gpio-keys-polled'), allow the passing a name via platform data ('name' field was already present), but default to old behaviour in case of NULL. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/input/keyboard/gpio_keys_polled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index edc7262..3312186 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -272,7 +272,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) input = poll_dev->input; - input->name = pdev->name; + input->name = (pdata->name ? pdata->name : pdev->name); input->phys = DRV_NAME"/input0"; input->id.bustype = BUS_HOST; -- 1.9.1