Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4316341ybi; Mon, 3 Jun 2019 08:56:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdGDknj6BWs8VN/EW/wNPaOmoANXL3BK6bpRydd4+Y8ezp5Pm1mh2oXmvwLThd9Dvf0wu0 X-Received: by 2002:a63:d416:: with SMTP id a22mr29501984pgh.218.1559577407620; Mon, 03 Jun 2019 08:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577407; cv=none; d=google.com; s=arc-20160816; b=UXMyMuFRDQqpw7fY9woiXsI5EU6VVMU8jDuwTSBd11mvY3z8BxlEeE+i8PhlSDJkPG f1XrPUdH7/2irD4eBqjJ6sIJnhzDGH9HU+9O/H2hK2ksxaqpxElDPmBVnJ/10VP43ktK RGpjuOfbTrC6TIiP/kbJPx1OALOgZF75WnYpJ5DAWr6FecMPS5bKmrCbNi3abSN+FNXe w8YCZAAOto9LXRLk5rKU/KFqEk3xCpSWWAYyPwIzTb8Vu7efbJMGoqSX+SCuRPHvCqRp 35Y7djsec+bmL6AhP/l+N4HnYWgTRxJd291nIKIXtsVzooXrXO2DBpxZIEJmEjYL/3Yu l2aQ== 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=/V2EVnxYD7YVqjJ8oELaZhlqmh5BZiS//pdTTDVuccg=; b=qLAgvT+dFjSyIh+2ETPOq/lEucz7HbuuT2EFhrQNLpCyMESP1gn+2P6bZBoIV2mBMa jTwMQN9Z2f4FeJmPhb3YwZPTcyXk9tvNDvu4FLuh/ibMr9vhPqLna71BJLQlf6LzUcGi b2386iDDIUpld8h3eVCvy5Rm2xKFu6NVdbrL6j3mgrGkqKlFyyquMDJBETqPVe7OlBQf druPwJSvtRx1hV9N+9HCYReTq2W8yxyFQ+3hQjcnUxEBbeHchVcIh1GA7xkphIhaRUYQ J5Xr0aPmpi3qFyglEv4BWm9CuWHNc4cWK/vIXP4kWwX+oiIPWhDLFX4kjIGLFWLVrQpL uVCg== 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si18436343pgv.482.2019.06.03.08.56.31; Mon, 03 Jun 2019 08:56:47 -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 S1729696AbfFCPxj (ORCPT + 99 others); Mon, 3 Jun 2019 11:53:39 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53906 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729426AbfFCPvy (ORCPT ); Mon, 3 Jun 2019 11:51:54 -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 42D101AED; Mon, 3 Jun 2019 08:51:54 -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 06C723F246; Mon, 3 Jun 2019 08:51:52 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Tomas Winkler , Arnd Bergmann Subject: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt match helper Date: Mon, 3 Jun 2019 16:50:02 +0100 Message-Id: <1559577023-558-37-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: X-Mailing-List: linux-kernel@vger.kernel.org Switch to the generic helper class_find_device_by_devt. Cc: Tomas Winkler Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Suzuki K Poulose --- drivers/misc/mei/main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ad02097..243b481 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -858,13 +858,6 @@ static ssize_t dev_state_show(struct device *device, } static DEVICE_ATTR_RO(dev_state); -static int match_devt(struct device *dev, const void *data) -{ - const dev_t *devt = data; - - return dev->devt == *devt; -} - /** * dev_set_devstate: set to new device state and notify sysfs file. * @@ -880,7 +873,7 @@ void mei_set_devstate(struct mei_device *dev, enum mei_dev_state state) dev->dev_state = state; - clsdev = class_find_device(mei_class, NULL, &dev->cdev.dev, match_devt); + clsdev = class_find_device_by_devt(mei_class, NULL, dev->cdev.dev); if (clsdev) { sysfs_notify(&clsdev->kobj, NULL, "dev_state"); put_device(clsdev); -- 2.7.4