Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp2765551qtf; Mon, 12 Jun 2023 09:43:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QH3yWBfIjpVaIbyrL+uVZWEVMubX/R7XX6xipM0uvOmoer9xM2xujHaI1ijrKQzhQrbVC X-Received: by 2002:aa7:8882:0:b0:63d:45f3:9fc with SMTP id z2-20020aa78882000000b0063d45f309fcmr12342684pfe.5.1686588209837; Mon, 12 Jun 2023 09:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686588209; cv=none; d=google.com; s=arc-20160816; b=GZa0kAedz2LuYe8zyZOHxN/t8IihqUyISYVjWa2K7Mfp4Gkdfb5cGKWNXw3jzdw6Su owtgXWy7I4qvLv23gUMhn6KrgBB2lIjNRlgzyrdH7xVEIXSDpCwrbouEMD8iWV+6uNmP 36ZV9oiGgFQrlZH/eE7NZOA3z9ABrvR7oIEf5z2A7i/kn+Wtj50oWnUA5yvIT5BuErGL rN+etWpoWo4J+TXW8SrpR3OsfV7XwYnOhRVw2ZAhasV6+kpLhjh50DDLXdV3SoHjzzvN JFEblTlTN/YkAbIOxRm+7mTWIJ9LE5PixntEEnGTN7ii8wr8hEFk9zaIQcXWFi9Aj4yZ x9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4hcrra1OLU9genHZMiFSrjrLjzHnkJK1hNR2zLDA8as=; b=cMQSQfs6RjL+rbAthxDvJBRBFhWGA5nMfRrj83NL1UtV/CSbQ3cj9H433+5k3e2Ziy lFoPR8yRgcYGmfPY7A7IoG4F6nbidUyRjmnvqulUEZAnKLEdM8PJDJEHdjdptovneqyi S0mG5QJv3iifIIKwtIZWpRuwhA0VTsX5yPfV5Z5XR3APge8DF+a7Il54CIoimymntqDL iKQkeVJ7jYitNMiYdAzbRm3SJuQndfkovjtY5nQQss2ojiqe+PWxEcf562m2qs8mzg5q PKbQ8gyt25rqvAIHNAMu6ECz9L5W93cceRGvI+xggexAdPuiDaH8KArQ3ILOjmmuQ1mM v0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Nmw7Ixa/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g136-20020a62528e000000b006543a5c8fb7si3903691pfb.286.2023.06.12.09.43.17; Mon, 12 Jun 2023 09:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Nmw7Ixa/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232979AbjFLQM5 (ORCPT + 99 others); Mon, 12 Jun 2023 12:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232662AbjFLQM4 (ORCPT ); Mon, 12 Jun 2023 12:12:56 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C599C5; Mon, 12 Jun 2023 09:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686586375; x=1718122375; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ekjCA2CGwiZrAX/o+zl26feODwMRZ9OhX+gAL/VO0z8=; b=Nmw7Ixa/Wr1RI2UbrHa9u87RH4HNNdy/2HnMpNBxBVbHxr62fKjOuRNn ceap7mDXxn+zU0xsqAGZumDjBu0gl1ssIJZBJ5jqzrxRrSmetdFQMTPx0 h3B0JX7bEzJQiccVFP89SqeM+pZHHPuIQYUTY7UOWQlmQ9qXp/zluXeZE TTFozMNNexUZ58TE8s+QdsqTeFWvySujfMOt5y+P82K6wY6QaNSN+ehKo Usf4vqbrdfkpH04kFFklg1reB4WUSH1L8zAsqNeAZtaogJpQaIfQtHV+p H1by1CqNmksx5f/xtLLeKmrSGDjqNueDi07MqrXLASREFU/8l6/SMyWE6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="360572639" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="360572639" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 09:10:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="824031046" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="824031046" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 12 Jun 2023 09:10:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DC44C3BC; Mon, 12 Jun 2023 19:10:13 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Greg Kroah-Hartman , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Hans de Goede , Jens Axboe , Damien Le Moal , "Rafael J. Wysocki" , Len Brown , Daniel Scally , Heikki Krogerus , Sakari Ailus Subject: [PATCH v3 3/3] ata: ahci_platform: Make code agnostic to OF/ACPI Date: Mon, 12 Jun 2023 19:10:11 +0300 Message-Id: <20230612161011.86871-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230612161011.86871-1-andriy.shevchenko@linux.intel.com> References: <20230612161011.86871-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the help of a new device_is_compatible() make the driver code agnostic to the OF/ACPI. This makes it neater. As a side effect the header inclusions is corrected (seems mod_devicetable.h was implicitly included). Reviewed-by: Sakari Ailus Signed-off-by: Andy Shevchenko --- drivers/ata/ahci_platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index ab30c7138d73..81fc63f6b008 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -9,14 +9,14 @@ */ #include +#include #include #include #include -#include #include +#include #include #include -#include #include #include "ahci.h" @@ -56,10 +56,10 @@ static int ahci_probe(struct platform_device *pdev) if (rc) return rc; - if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) + if (device_is_compatible(dev, "hisilicon,hisi-ahci")) hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; - port = acpi_device_get_match_data(dev); + port = device_get_match_data(dev); if (!port) port = &ahci_port_info; -- 2.40.0.1.gaa8946217a0b