Received: by 10.223.164.202 with SMTP id h10csp4342196wrb; Mon, 20 Nov 2017 13:59:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMa07GpI1ojnd0vZWyIchTF4NgchTo8ld6dNC723+KMJBPFC+pf+hTcbgUggsGQBYp6LHzx1 X-Received: by 10.84.172.195 with SMTP id n61mr14843786plb.78.1511215159522; Mon, 20 Nov 2017 13:59:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511215159; cv=none; d=google.com; s=arc-20160816; b=RqEyYUBTQfVSjNCrVNpLNwcFK8bstU/iRPSZekKudbzTXkczp8RPz3EZAAwu0eUAg5 cM9vZY8hnaz+BYmVCh33aGyJANMSNjDlD3wwAT2FwxbSdCLKHmBekbCBvNs4GA7RETbY VlBtPMlF5SM2zbkzlFyfkXO72LgujsjQX9JTYaelh8mWpKLzveW09qSvg0pU1GeMp1JQ 8VALEHfpZD+kNNsctE5toYQKPFfAOC10ARQVrJUTuljKx9rFAzXb3isnSfhFuwDj7wAU pEi9fJIpNklaDFZRU+Nqp4y3vZX8QQE0LgcrodU/JxBgfeXbHLjb2DsDH7C72iS1xWyQ nDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=aI0yy1GSdLzoo/VgGXZmZIvEjQuVFN5ZV9tWfyfE+fY=; b=SoixrAAkSx2xI5MS1FiG8fICQbCnCXM9ESm4KCNWRHqYMXzPmHDRAn9/U56R5lCXT8 yZ6Ay3VTRDOxzfqrCE/oNFpyKSyx8H/iZH4VkYhyaUll+KU7mojzkIMKEPd3mNxgzQm7 lveGwivpReADdDxETUvdlG8uRmVMS8S0R3xrvUqbkK9nXYgRWCcpA1vxtQPWlGIueDWP N8QqhtZ/8sCGktdNY0o18iosVQSUbVbmIODuKGLAZTsNeqT9NBPzT3l8Mbcj85C4V3QG Jz8oZX9JmApUAKTOTS0sMKTg46dOhlxW9mijETEVhMJArNCJA9RGFwOaUpmpEDcp5I8x GyZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jOgnaDnu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q24si10155650pfi.54.2017.11.20.13.59.09; Mon, 20 Nov 2017 13:59:19 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jOgnaDnu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753129AbdKTV50 (ORCPT + 67 others); Mon, 20 Nov 2017 16:57:26 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33449 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752932AbdKTV5Y (ORCPT ); Mon, 20 Nov 2017 16:57:24 -0500 Received: by mail-lf0-f67.google.com with SMTP id x68so11817947lff.0 for ; Mon, 20 Nov 2017 13:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aI0yy1GSdLzoo/VgGXZmZIvEjQuVFN5ZV9tWfyfE+fY=; b=jOgnaDnuIjUaJsfRbLQWw8oyi5CYKxKEZFpcmcwAJXWyySWFjJkJLo+NlGVZeAZHeb EK9XXUpawssDJOLw7qmq6IgYcII+HmIgfF3aHT5KxUr6aYsH0XV2J11spsWeHPOW1+S2 5B6WjWm4NY+VYWnyKtBgYde097h3Bn/P1DvDXbPKDvmapQlLJKZSjkhBswGRmaqRnhvM SmpykCb+7BE+YTCScvFGIlM3ZQaKZ4QcEsVAzDCv6TpRDOfz//B9+oxZrWeNL8+XIbCV IJb9uoGuY5rvcArbxJVGcAPirqQIXhqdPu+sB/MEqHfQe1PynUV8qm49FgURGbgW7P8C ZpuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aI0yy1GSdLzoo/VgGXZmZIvEjQuVFN5ZV9tWfyfE+fY=; b=btPItQcmw+gl4kRSmmjYzW+cYNh54UKb4+LjGeaBBC7clWT8y02EdB1qZRKf892zoL nh7fP4YoKc1yT9Ajn30CPJDQt6BADA40tQKAokkg6fG3zX+dfR6w2K6MtdIWG6e5J+rC mLQs8WY28Bteb44gYyvMd6q/yIiGf+nsV7uCd2yYX0nYVQtE8xeG9UfzUTTGUsaAdH12 UVP1I8ZO0nJwsULV9VnOLQ4p33eLC1vBgwYW44eAYOlQGz/8jV9OWYCvK6aKMZsu3QPf UBgD1DKVxpg0/a1x4wC3EyiKgRidyiHNGsrzCXyNbS3Z5GjXOQ2jLWFuCSSVD+ivSjgb CJ9g== X-Gm-Message-State: AJaThX78mfHOD7njjGrnPt4XQ1RNZksli6soK8snnrg/nJVjDCvCGQSD ZJRabv/S9y9dvEpEtZbi0u4= X-Received: by 10.25.20.167 with SMTP id 39mr4753129lfu.67.1511215043362; Mon, 20 Nov 2017 13:57:23 -0800 (PST) Received: from phobos.ciupak.eu ([31.130.108.122]) by smtp.gmail.com with ESMTPSA id s5sm2109904lfs.55.2017.11.20.13.57.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2017 13:57:22 -0800 (PST) Date: Tue, 21 Nov 2017 00:05:50 +0100 From: Marcin Ciupak To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH 2/2] staging: pi433: fix naming when more than one radio is used Message-ID: <816efe02d72bd845a7654fa86ab2a5d78d1064de.1511218324.git.marcin.s.ciupak@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171013 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When using more than one hardware radio module pi433_probe fails as the same name is used for all modules. Create unique name by adding minor number to the device name. Signed-off-by: Marcin Ciupak --- drivers/staging/pi433/pi433_if.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index bc17676169cb..7a3e3101c483 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -1172,7 +1172,8 @@ static int pi433_probe(struct spi_device *spi) &spi->dev, device->devt, device, - "pi433"); + "pi433.%d", + device->minor); if (IS_ERR(device->dev)) { pr_err("pi433: device register failed\n"); retval = PTR_ERR(device->dev); @@ -1188,7 +1189,8 @@ static int pi433_probe(struct spi_device *spi) /* start tx thread */ device->tx_task_struct = kthread_run(pi433_tx_thread, device, - "pi433_tx_task"); + "pi433.%d_tx_task", + device->minor); if (IS_ERR(device->tx_task_struct)) { dev_dbg(device->dev, "start of send thread failed"); goto send_thread_failed; -- 2.15.0 From 1584738398853126047@xxx Wed Nov 22 04:18:29 +0000 2017 X-GM-THRID: 1584648462974285653 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread