Message ID | 1559577023-558-44-git-send-email-suzuki.poulose@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4646275ili; Mon, 3 Jun 2019 08:53:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvV9xXipVySPvJrNR7qxbRkCporxq2/wkY+aMI4KvG4s19gBI8RUPVLVOe+ifZbS7kIaxh X-Received: by 2002:aa7:8219:: with SMTP id k25mr33045796pfi.38.1559577207248; Mon, 03 Jun 2019 08:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577207; cv=none; d=google.com; s=arc-20160816; b=kXbEK8YdCKANp9CIavPssn/GKvMG2yoJCVIeky5YfbdZE8YYy725DrrCd16J6l3ji6 V6Lt3+DC8yS4Us1lQbcXNI27f3TxR7q/lMXIiJsc+1qv7fWteYDmhhaEs3+LJBFvfK2A M5zZfMcyMBI5TieN0V18qsBaSy6QqHbLC0tbEywT2vXMEBXuG7EnujuE8BpJR1XitRtC ie88YRsOf34pY1JK5IpDn7bGppwuH8A4AyvZsZ0Ex95EHrsrmXB5VZcKK8EAJGnKUulK S3uDJBVoqnEzUizIqtY5MmL0nyBoy4n/6Yte7zOLpWGMnP3J5eA7xdiWRf45YD6pM/sR EBNw== 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=V7aSinaUk9mv/uEQF+0uvsfEa14bituZqCOj8Ew3EJs=; b=OBx7pSnmbODyl/nTZFy84ApeoPh6Ph5xFhOTqZZiFqvr25wqysTYrcAPntcrYWhtnL /W2cteVBe8JSJ+yd0PbOtG8qhBKXjsa3UGa/SqXwMK5+caYUTYXqKZySWGZ7C/TtSMti cimWYURB1NA0u60nnNjfhz0UnO3g1Bmym1qCORU9Z8jrhMW6W0FlCVeYDunRf3p9udV6 6V/Zvt3WPa1JglKxprOiAeM8btnYZSf9uArWx+PDQyJvfaMO81fmqqIAm7IhO0fk51pp WjCAFinhKTheLZB8XbkvMhpfXHA8txvhKkcTeSaihUDouIlwGJyb+WgSo2NzWVplT+JN S4Mw== 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h187si21804126pfb.129.2019.06.03.08.53.26; Mon, 03 Jun 2019 08:53:27 -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 S1729211AbfFCPxO (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:53:14 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53986 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729491AbfFCPwE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:52:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 804261A25; Mon, 3 Jun 2019 08:52:04 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 672DB3F246; Mon, 3 Jun 2019 08:52:03 -0700 (PDT) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Jiri Slaby <jslaby@suse.com> Subject: [RFC PATCH 43/57] drivers: tty : Use class_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:50:09 +0100 Message-Id: <1559577023-558-44-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[RFC,01/57] drivers: s390/cio: Use driver_for_each_device
|
expand
|
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 033ac7e..b078fdb 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -2950,17 +2950,11 @@ void do_SAK(struct tty_struct *tty) EXPORT_SYMBOL(do_SAK); -static int dev_match_devt(struct device *dev, const void *data) -{ - const dev_t *devt = data; - return dev->devt == *devt; -} - /* Must put_device() after it's unused! */ static struct device *tty_get_device(struct tty_struct *tty) { dev_t devt = tty_devnum(tty); - return class_find_device(tty_class, NULL, &devt, dev_match_devt); + return class_find_device_by_devt(tty_class, NULL, devt); }
Use the generic helper to find a device matching the of_node. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/tty/tty_io.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4