Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1083200imm; Fri, 14 Sep 2018 10:53:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYsqSuprubIVTpP0ZTsz8Qg8sYBrw+ZTteNTfPyHU1kRiq0EwFIoZA1X9bEYn3sXYvHGv4i X-Received: by 2002:a17:902:2f43:: with SMTP id s61-v6mr13050153plb.176.1536947633464; Fri, 14 Sep 2018 10:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536947633; cv=none; d=google.com; s=arc-20160816; b=S/EKyxQUHgApHGxSJKRJqTaY4hzSFcxU9H9u1AMlLAb51k1MSZd60uyvxqJKzTMAz4 o/H3CafWC1G+dzRXEQmxpEJA0vD3h6NKDw+uVtgBaYP66PZTxbjc4mgCVuufsQm5uwkM WHSCCRtRzY21FaYvXyqBQ/DWILhzTR2fndCpe6mCbc+I9q0b01jf0eFwRuYV9/KvTvZJ qHr0poixY52NNACaCcp37UTGGvx+zQqyjf04Pe4XjqpbxMZP57x2IINcU2tTVnJwMX5Q YGdFnY3LKmne1+qZxcmmKoNj3jfKl7mZIvaHm4V3EMxDzGbkdmckUFNvARlOJ+g2SYNo IRgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=Aghgp99e/Neo0QIJdksLf40AiG9Y/i6WDdqUf12X/Qg=; b=zmG1wRrrRUTzILbLO3ZiQipdJGvF1CXDsQmtVybj+z6+prK4IdgcdFjIYSQ2Y3Wg9w KkZ8U5u9Hm1by97+H9BvkZnYd/DvrUI5GjzDIvvGo9AZRQ7mhSl++hQ6lfF+xuULBaTG xblHi5131CtqXCoLI+vwOuKNa+mRNJ+0Md6R547cH58vYCiqYugwrThBVuAbgRh2oQWh dZsvx4ySwTzUNkioIj5ToSCz40LmIexNSeqUTEYzU3uKlQQc2KMzOnZcIbpKLGbZJwsR 0s5Ir/PygV6t5b4NHZqQUakv6Yv0AidmL54prou3LEmoTCaSiEQiE9rRvKAe+OVxcGLs aLNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="LpCvYw2/"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si7602543pfi.369.2018.09.14.10.53.38; Fri, 14 Sep 2018 10:53:53 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="LpCvYw2/"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728498AbeINXIf (ORCPT + 99 others); Fri, 14 Sep 2018 19:08:35 -0400 Received: from mail-qt0-f202.google.com ([209.85.216.202]:40624 "EHLO mail-qt0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeINXIf (ORCPT ); Fri, 14 Sep 2018 19:08:35 -0400 Received: by mail-qt0-f202.google.com with SMTP id c14-v6so7774610qtc.7 for ; Fri, 14 Sep 2018 10:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Aghgp99e/Neo0QIJdksLf40AiG9Y/i6WDdqUf12X/Qg=; b=LpCvYw2/i/wVh6dEDWh+vhOY5e53+LrKGMli63AkMJI2Gan2FONyB3zCEcj0B1YWLW RKS5XINGSMAN0sIoneyjVkjuq9dj+TqUOfW5zfaAw5k7c3dveKNx/xxJBgw2vCcYErb1 OlQhV898N/IvROByLuBhO1rEV+Wad+9VyF7byPaIe2W1uVvzSYVAwxtb7XJrIg6LwcsE mh3sUilAqLwqz6wrYRv1y4ivEmk+WfzSh6azIiVArkY4ml4V2ecPGA3RBtYfV5cScveJ 3Ph8VAsGtr3YFkmVG5J9nbxf5H4krWu4dsufJ6oAUg0d3SzJPrmEhvjJnG+HaymC5h6G sOCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Aghgp99e/Neo0QIJdksLf40AiG9Y/i6WDdqUf12X/Qg=; b=bpgexHNoWMOh8IBYVBZ0cAsOMDjwtL6DS8IWUnkMtA7X35AGotAmrk5Bk2NzoaoeJm MGPjDWio+sJJewtYWyCP4RWI2EILSMTVExi+wuqVPtN/bROKiT4qS4pibtB69CcnZonR 85oqHarDugFcR0AGKiCRX5Io4d0BQUzH1zMUGP02PZNRToOFYQ6UMYXLZf8JJGyTLg3O dpGHYIACN89KJYdmMGhofh0HpBLC9hxr7AW6IayNAQzZIR2NJ3DDALlYfzbmNmW3dl3r 5aD9xBXnAzn+iGppLjCNQU2TZN+GKwHTDJeDYMCQInxIOVI3eX8CkkWYp9arqiUGJZgZ QSIw== X-Gm-Message-State: APzg51BKbzU+Dmmzu0Oq4OU43RnSKWj98P8EHL7jcw/i40BjEeIrp1sB hMidHID96Qc+yJwEMe5aUAyNFVnr X-Received: by 2002:a0c:873c:: with SMTP id 57-v6mr4192032qvh.38.1536947580926; Fri, 14 Sep 2018 10:53:00 -0700 (PDT) Date: Fri, 14 Sep 2018 10:51:18 -0700 In-Reply-To: <20180914175122.21036-1-rkir@google.com> Message-Id: <20180914175122.21036-17-rkir@google.com> Mime-Version: 1.0 References: <20180914175122.21036-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.397.gdd90340f6a-goog Subject: [PATCH 17/21] platform: goldfish: pipe: Add a dedicated constant for the device name From: rkir@google.com To: gregkh@linuxfoundation.org Cc: tkjos@google.com, linux-kernel@vger.kernel.org, Roman Kiryanov 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 From: Roman Kiryanov Create a constant to refer to the device name instead if several copies of a string. Signed-off-by: Roman Kiryanov --- drivers/platform/goldfish/goldfish_pipe.h | 2 ++ drivers/platform/goldfish/goldfish_pipe_v2.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.h b/drivers/platform/goldfish/goldfish_pipe.h index 41e831f59eff..178efcf52d22 100644 --- a/drivers/platform/goldfish/goldfish_pipe.h +++ b/drivers/platform/goldfish/goldfish_pipe.h @@ -16,6 +16,8 @@ #ifndef GOLDFISH_PIPE_H #define GOLDFISH_PIPE_H +#define DEVICE_NAME "goldfish_pipe" + struct goldfish_pipe_dev_base { /* the destructor, the pointer is set in init */ int (*deinit)(void *pipe_dev, struct platform_device *pdev); diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c index e3358c682562..2332aa4bfcea 100644 --- a/drivers/platform/goldfish/goldfish_pipe_v2.c +++ b/drivers/platform/goldfish/goldfish_pipe_v2.c @@ -1109,7 +1109,7 @@ static void init_miscdevice(struct miscdevice *miscdev) memset(miscdev, 0, sizeof(*miscdev)); miscdev->minor = MISC_DYNAMIC_MINOR; - miscdev->name = "goldfish_pipe"; + miscdev->name = DEVICE_NAME; miscdev->fops = &goldfish_pipe_fops; } @@ -1140,7 +1140,7 @@ int goldfish_pipe_device_v2_init(struct platform_device *pdev, err = devm_request_irq(&pdev->dev, irq, goldfish_pipe_interrupt, - IRQF_SHARED, "goldfish_pipe", dev); + IRQF_SHARED, DEVICE_NAME, dev); if (err) { dev_err(&pdev->dev, "unable to allocate IRQ for v2\n"); return err; -- 2.19.0.397.gdd90340f6a-goog