Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1853292imm; Tue, 2 Oct 2018 15:22:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV604OgWW4r7OleGRQnstHG6Sbto1jHXviEVMT94Lwk1JJP8jn/OgacQDx2+dc9c3Y1hnv02b X-Received: by 2002:a65:668d:: with SMTP id b13-v6mr16189055pgw.163.1538518920523; Tue, 02 Oct 2018 15:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538518920; cv=none; d=google.com; s=arc-20160816; b=FOSQLg5GdDO3vplVbZtkpsVScE/p6Vyg/1tVc7eoEGZz9+/w9G1ZlOJynsAEW3x+rq lUL35YjjdGeQ4ASrlRIbQ5gCFWxEx9cQTu5+ap5hIz0fJPVdG2ACuIeGW4lPkXi1Gkso fUJ/OVQ8WERA5CMlFB+XdBwa1utYYPOUBSRhKxjtxebSgqAfg0t7gogmNebAd37HOb7z UEa6cS629CRSxUzM51Txa9omWq6PAfD+1hC8V3jEUFlwUpdmEVFKA7xlzhIDO9LKXLTT s+8briuDttDFFL0ooi8PWuAVIRMQZHVRF25+Z0etitHSPmWxgFXKOLJVfm2k2LrodYNt Zlhw== 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=QkSX0jMYrsg+ctosVnJt3SWNB+wWVP6PkDmWoypdc8E=; b=PYuhT7p+5NiMJShg9oSmG1cZoySJzmGC9ZB1N2TSpfIAF9UQShsXsU6a6S+4guU2yj QYeb5KoMvRjSSR6A+ErAQ7HUweKeNRZrbuR34Ihuc1eMcbtYiOLKiuuOPWlkowJ4IBRm 9bEEQ23Nl3XSJa6PpM5V9u7KbOmua9MJEzqM6x6k2snoLa1ZWGEFGfal2FZ6mGGACw+9 mc1rsfEpCeByfPe3yfg2OnhQORTER57Smfnn02lDNL+anSkN8XfCvMQcjer/TF/4tT60 SsPS+ukdzWPMPZDxtBpT5eaoo/IL35MDJhauZlHGYtQ112xjjorlI17DtrrepR1yoqq7 BsEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=klra96Vb; 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 5-v6si17788565pfz.160.2018.10.02.15.21.45; Tue, 02 Oct 2018 15:22:00 -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=klra96Vb; 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 S1728369AbeJCFGZ (ORCPT + 99 others); Wed, 3 Oct 2018 01:06:25 -0400 Received: from mail-pl1-f201.google.com ([209.85.214.201]:57304 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725198AbeJCFGZ (ORCPT ); Wed, 3 Oct 2018 01:06:25 -0400 Received: by mail-pl1-f201.google.com with SMTP id v7-v6so3996721plo.23 for ; Tue, 02 Oct 2018 15:20:50 -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=QkSX0jMYrsg+ctosVnJt3SWNB+wWVP6PkDmWoypdc8E=; b=klra96VbyD+TxdbIjLoP8tSWFaXHuSicDTzAqFQOjRLapp84/yJFwyx/JFeGTR4nhG qTXW+J8kyH4mYq+PZwtGmflatPR0u9RN8Jb6pwsGaCtNviT8nqaOK9sikvQyu5Zmd/oK gzUiAc01XrnIz7aH/ToWrsxl+b5JO/XTXV4JF9KWBNM17On1BbqQrUZDTslWJl3z3rt7 uM5ryKRmdsNEaoSChCnvfMj1KSGnGIcX2QsYOB96Yf1nnyhyYByQ2mZjNSd/ii0LI9d4 RExgS1hU29pxfzr0FLTEs4xrmZUm2iG2GLFssjSqKEKw8VgucWvexHs6VKVQKM5jD9LX mniQ== 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=QkSX0jMYrsg+ctosVnJt3SWNB+wWVP6PkDmWoypdc8E=; b=qsjMmaD67RxK11oESfuahEfaCi+rqbF8UU7qLaxqwdhFNYBR43cAErayYU1taHnYw/ rdTdsptwdubzx8T0zJTLlvn/oVMwZVas2ao3ZzRkFY0bunFsZb1BBGp/v01rwut8LO+s xkuHLZ1o2g5XkNbNqGOViDlItUD1Ww0M7dbd1jJp4REBEECojUrMv8mXc96QFf7gYYxt 7kd0eQUETXu5jW+ULFNe6ITO4pQlCpQabBmcRkfbVHxEoEwfrsjEyG8byYImeY1dDTQO MbNo+hRPHH5L3kL+ZrJHBDj7+agKZ1wcetwPxVeZ3AaeVjg/epuuNK71k7SyOJOHWC4Q VN+g== X-Gm-Message-State: ABuFfoi9xt83GUEYpiJGWxT8WEG8WxuaYWHOZvS3ocsbKjvuVn9YcG+p pA1AKvYS4b65LLOj9N1l9WQ2eIwE X-Received: by 2002:a62:cc4e:: with SMTP id a75-v6mr8396380pfg.38.1538518850448; Tue, 02 Oct 2018 15:20:50 -0700 (PDT) Date: Tue, 2 Oct 2018 15:19:01 -0700 In-Reply-To: <20181002221903.19476-1-rkir@google.com> Message-Id: <20181002221903.19476-13-rkir@google.com> Mime-Version: 1.0 References: <20181002221903.19476-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH 13/15] platform: goldfish: pipe: Add a dedicated constant for the device name From: rkir@google.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com, 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 ee0b54bcb165..0fa6ecb32c6d 100644 --- a/drivers/platform/goldfish/goldfish_pipe.h +++ b/drivers/platform/goldfish/goldfish_pipe.h @@ -2,6 +2,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 9857ce07d0e6..0e2a62322477 100644 --- a/drivers/platform/goldfish/goldfish_pipe_v2.c +++ b/drivers/platform/goldfish/goldfish_pipe_v2.c @@ -775,7 +775,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; } @@ -806,7 +806,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.605.g01d371f741-goog