Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2866391imm; Wed, 3 Oct 2018 10:19:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CBiax+srcKjIFUTn5SptEfY3OOqjGEaGBiFsjt8rAhCmAxN11jTnh/xTAPrUO5sxWsyDx X-Received: by 2002:a63:7506:: with SMTP id q6-v6mr2219814pgc.137.1538587152084; Wed, 03 Oct 2018 10:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538587152; cv=none; d=google.com; s=arc-20160816; b=Gh5zsy6sxOeSKNQnappB/ZbefuQfKYq4n1z4o7edMnOM2DpZ3amoSTh5y8A7xUh85G KEFn1UKuXGYg5vjf/VGgB5bfCfnrc3QPZC6HIaqOWkr3pKjcUfv5AoUdrNGu+Z0vUmh3 lSoMMV0Vs8K0e93Vk/Po1rkVHSV7WClCkzuR31p4xmAcn/23ZHVsm/6TXKRcYflpce53 cPp3nO8B0sAHq2PSKyguI+SrDr0Y2x5yCsa+wKUei1hC6Z7X14M3JvwdKIDoypm+FLPK dA6Vdgii7m609dnyfEV0joblwcaKJKJX/LUnEhY2vUOOVvzMtghWrGILfxQlUCqd9tC6 h6Mg== 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=vps50yU90mqVrXWfVdGhzV3pk2wZZ0SonallQsP2DO4=; b=VjEMzaMZBFNMu84s5SymzIX7UYS4K1mBff3L6IX6EeHPWNf8FWZ0oMJU3RW1hsuwBc L+v/iRvImvSh8rGzzAGc8YlDQc9DzOytG0i3t9vyk/ddR5UvmI0P0JT8i+xDEOq8fiUM P6yOE9KDiqGjVtzTYUA4N9vLmpUzuZLNlo2rgJgQb0WQkC1SK7sA6lmqSaK01XdlPPfG yrTa0T6QyoaZ5EcG1sY0+3BSTdcQsdoqDgbi7Pc1eWQaWv9lTWnuhbL6zXxthFy+BfBi bSPQx9naIztDel+uS6JnwUu0JXs5Uzc4pL/kFVCvqJFvs3YwI1hxhOi+Qicwn81fqfvx g21g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CdQd4ZBy; 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 i64-v6si2169010pli.56.2018.10.03.10.18.49; Wed, 03 Oct 2018 10:19:12 -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=CdQd4ZBy; 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 S1727644AbeJDAHl (ORCPT + 99 others); Wed, 3 Oct 2018 20:07:41 -0400 Received: from mail-vk1-f202.google.com ([209.85.221.202]:44491 "EHLO mail-vk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbeJDAHk (ORCPT ); Wed, 3 Oct 2018 20:07:40 -0400 Received: by mail-vk1-f202.google.com with SMTP id t185-v6so398725vkd.11 for ; Wed, 03 Oct 2018 10:18:22 -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=vps50yU90mqVrXWfVdGhzV3pk2wZZ0SonallQsP2DO4=; b=CdQd4ZByHdBetErmsMTu5FsBbnVTiKwWYfBV8WgnCVqtNd/z1zP2HxLYdYp5GeVhuz onesiMfsg50FPE0Yf6w9sXVYcHW3/QCYTqV75iT7XhlfJ2pmooqCX7eyFHt6qaGx8fBO JO6Kz7bln7kzs8vor6jvHyZXK8h6rQCQsHst0DWZIMaMjcncxW397zMH/IRmZQHAOVJW 1EkQ/yS81S4D/K8dFYuSbkMfCWrZxx3lPfFfQx+NnvOm7K6G4WgebDfFTJPOxbEoj1h6 0BOo7uZLGTLe7E1dGdgoy2HZbZsfamB+lzDRNSpv5qtEhEsGULpqoQ/mX+acNhBW6OZE RLGw== 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=vps50yU90mqVrXWfVdGhzV3pk2wZZ0SonallQsP2DO4=; b=ZY3J4wgcGvmMwFY+q43+UdvPXxJffqlVk1qGu3Kc0rjhLm+6vIY0/DMCRP+ZvMH1lp lF+xRJsXha9wjVOYdyBS1zMhOQToREUbTMlmkgSoOYjSkqgyjOupDUg3AwYxq3DDGsQR 6hrv6K9nagdnh/86YJM39TKk8TXBTlkD9uNadZkWmpt0Wd28OcCFeBx4k1F3bXV6Ur1n xafAE35LM3Gy++cBFQCA0whY55NlcnZWeYEy8gSmlkl2K7IvjTtLnyoRl33nj9S1s99q kJlh0eVB9GBD91W2N9dCofAhxDC4WZvwfchMaFCrYhagKi1g6WdVxW6rfODAkvptHicF Ngpw== X-Gm-Message-State: ABuFfogNzhqZcEtkJBEGmseBJO4EM6h2CTM2IaNjLNDe7m/tmpQhlUyV eDRtPr90UFLFEKnCFCxuLvgqtUZ6 X-Received: by 2002:ab0:2044:: with SMTP id g4-v6mr2144037ual.15.1538587101925; Wed, 03 Oct 2018 10:18:21 -0700 (PDT) Date: Wed, 3 Oct 2018 10:17:18 -0700 In-Reply-To: <20181003171720.169953-1-rkir@google.com> Message-Id: <20181003171720.169953-13-rkir@google.com> Mime-Version: 1.0 References: <20181003171720.169953-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH v3 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 --- Changes in v3: - No change. Changes in v2: - No change. 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