Message ID | 20210915080939.21388-1-laurentiu.tudor@nxp.com |
---|---|
State | Accepted |
Commit | 5aeb05b27f81269a2bf2e15eab9fc0f9a400d3a8 |
Headers | show
Return-Path: <linux-acpi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62789C433FE for <linux-acpi@archiver.kernel.org>; Wed, 15 Sep 2021 08:11:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 498E461212 for <linux-acpi@archiver.kernel.org>; Wed, 15 Sep 2021 08:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236943AbhIOIMk (ORCPT <rfc822;linux-acpi@archiver.kernel.org>); Wed, 15 Sep 2021 04:12:40 -0400 Received: from mail-eopbgr40064.outbound.protection.outlook.com ([40.107.4.64]:36073 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231654AbhIOILk (ORCPT <rfc822;linux-acpi@vger.kernel.org>); Wed, 15 Sep 2021 04:11:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVsKCKoE+RoeRApSHAzbahKGsJPbVTAeZmSreQxCJoAGfSra0QKu7LULpirh2wEc/Emj8oN7hiSssAQJZO2IgpiQcZxbEPqo2R8TGE31o+7bKs+H3pN3i7AlGlYwCXMjiNwwtGi1h6RVuhDS3uzDJIRz2a3zDeCVGKuk2viB+1sK+oLto9LjWJ1GWQeT2P/8A1EC1Af7ITUOf7Jk7cxciECnI0Su3h8AttBadNLw91XbYce2A/ILtfVRcQP2B/Xe+O5K/c933y3QwjgU2x1ggaFdxV0s7UiCLHlKU6IJY8QzTCPURbb3o2xN6VIuzmyR47MYJB5/dfqelsAm0jLH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Qu+sV+39EneGiXnIVdTt4O/KLioBZnh/KSrXHvN9Fcg=; b=A6B4LPFNPKmnP8KkPS+FDZJTJu9+UuSawkeQSEz0wdGDP9AEzMLs4IMllhDOM71kTUUPsY8zdCIoJdjSUFkzhyI/lMP3OOv+al3IZnuhKmofCGgeVeeBUBkxe302rT5PFbYAHEsHGNDbjn+YQSAt120t/JMAMTrewkAgU37YXHtCXKIB1NgOQRBohOvVv1+kwuueLI/ymRtkHAkRqk2F8PxPAcD3O3J0MlnhZXgCRFIKZQA41joDxgPX+1emdoPjYfO1CM1+i8l0ybYDf+JrHyRyHg+GA6f99XllfcNsYQ90UEbN4hHub5VuAL8gtkOpWfQ2GxLCntfAplCZc+pLlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qu+sV+39EneGiXnIVdTt4O/KLioBZnh/KSrXHvN9Fcg=; b=s7SM5BKreHosRsMnfkb+I4Y9nOJKiGk3674LtpXu8myJ61KVeCwXXeCyRBHFxeo/XdPfJV0wmGmf8A+Vgw3bf/jv6sxW2wIyvz/FcD6u4HWgJwPop1EevY3zX8IER+pOSTiEY3f8P91Q7/q3YT6I6Y1U6h3gak8e40a5Od/H3Zs= Authentication-Results: linux.intel.com; dkim=none (message not signed) header.d=none; linux.intel.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR0402MB3405.eurprd04.prod.outlook.com (2603:10a6:803:3::26) by VI1PR04MB7085.eurprd04.prod.outlook.com (2603:10a6:800:122::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 15 Sep 2021 08:10:18 +0000 Received: from VI1PR0402MB3405.eurprd04.prod.outlook.com ([fe80::e948:b382:34fc:c923]) by VI1PR0402MB3405.eurprd04.prod.outlook.com ([fe80::e948:b382:34fc:c923%7]) with mapi id 15.20.4500.018; Wed, 15 Sep 2021 08:10:18 +0000 From: laurentiu.tudor@nxp.com To: andriy.shevchenko@linux.intel.com, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, rafael@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jon@solid-run.com, Laurentiu Tudor <laurentiu.tudor@nxp.com>, stable@vger.kernel.org Subject: [PATCH v3] software node: balance refcount for managed sw nodes Date: Wed, 15 Sep 2021 11:09:39 +0300 Message-Id: <20210915080939.21388-1-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: AM3PR07CA0097.eurprd07.prod.outlook.com (2603:10a6:207:6::31) To VI1PR0402MB3405.eurprd04.prod.outlook.com (2603:10a6:803:3::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-101.ea.freescale.net (92.120.5.2) by AM3PR07CA0097.eurprd07.prod.outlook.com (2603:10a6:207:6::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.8 via Frontend Transport; Wed, 15 Sep 2021 08:10:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e996c16b-5f2f-4c44-0ea4-08d978204183 X-MS-TrafficTypeDiagnostic: VI1PR04MB7085: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <VI1PR04MB7085EDAD2BD5918F458B8EF2ECDB9@VI1PR04MB7085.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WaV6NEewJn5iALaLeIdjIyzwGHJK5JlfPeCB2mizg4Sq3TfVH3GiRVpbRfhgelSDeY2mJYJ1JMl66gYd7qSAR955vFVmaLU5+tTcVWednGWYfq7eHl4ozowECQUjIHqIl7QP5YCidFVtayPwU///YIHYbUbxQhPUjzp1PZ6b2lvofEk48yb/m8zRyJJqC31T18HEjYCvNS2i5nKuClEP2LxlcGUjgb2dv+1LAEFW7ZaC6+NYOhKs8Cl8uhcI9MJ3O88jRIsb1HCvDGLMtFWSJClhLn387hoAGRxRXxg5xpw1q9vsu4TOgWnO5+uYpdEJLhQBliOakNmHlFrRrJ3VkvuJ3Lx5yVualxO3D/yhH1MyKgu6WCx5uS6G9DFPIXjVvpFnk17Cp/QPGQ6r12uy27m4nMWRDlDAzKAIv0jkM0m6XgB2Qm9dKQ3iQ2UHTCD2idcYSm16gBhLL5Tj+m7OBtVz5glhj4gSel7a1Rr/isjPksrALlMaNMYKXEYgBSjM3FfEZ/tAeWcTvQdLl3d3qqWo9DGP49I5Bgkkx4nhUmEFb7Nzrkt8SdL+zqg5zAh8iYwQmaxOoO4p4HG8LDW7xsu+H8ZRq7qgKOB2hDZvEQjQ2kWBhft8HqeNvEH7lOxu5r//nVr6dhFgfExx3qnQpGG4uYVhannLMx/03xsi7FA5sRZ5yN7vPebYmWGfZEqOQMseDj2eezIG4kCA1MvSVw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3405.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(376002)(39860400002)(396003)(136003)(186003)(6486002)(4326008)(2906002)(86362001)(66476007)(26005)(478600001)(9686003)(6512007)(6666004)(38100700002)(6506007)(66556008)(38350700002)(66946007)(8936002)(36756003)(8676002)(1076003)(316002)(52116002)(956004)(5660300002)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jixp+aH7Miyl9a6r+/Kx1YhFZSLIDkmqxqKYYZvnEnziY6lvBWD3PafhRcsJFb/0AYIBj2N80vt4mjPQWGrSuWp6MHHFGO9FLxChGwWooPt/lr3NXOE3b83mfva4aE9ECh5u1y1Jjc6X+z21gWQlx4tSmzW2Zs3srnC57XTXJsYuvzP6mAoMchWnJMvwPhMtv7Nr/MNI+t5rZJZDJRxfC7gByMzdnpMxYq8xtA/J1wPR82sozcXWX0yYfaekpW9IDJ1g+igdO9Mc0CEyOXcLoGdLswwsvEFn5DICmN40khIcze4XS+iIQbeaJhpaIicOWCrPN/dl7+V/avWxopF/ylOcQXPKo4neGlav7DCtUYz0JbiDTa/RNgJve1QFhQNlBN9YmobZX+t89D2zWlpGeZqWZq0I7Dv1aXTVzTcRG0o3fyX4PQcFB98j50xrkEsAL+gBSfAurtnoSzWGWHc+3SxoSZA8+QrZ9LYx2IALqKzV1ZTqIQ70pQfsUiEbseNfE1OtbG7lPy07rNsSMT99HUnV9MOqZrRPf2BR28L1c3XPoDfVUFSnYPbPa65sfBxROzrbn92uTOPJ97WwBOskUoQmDIB5gQI305wpLPWOJxgvba1Nlk+90f2Q0q6jDjKIQ6x7Wu/4ATnEtPXn48G6VxnrCbh1BfjKba10xORNJVFyighrMZizE/l+fW25IVOiO6zjxM73BpKkR5BT8M2rIr9ITOPwNfgB4nJRRh0Te3FyyciWMczDRk+CeeNBbRs+rhv8d7EoVk13NC+StgBoX9HzjpwbkXF5dY8X3ShxGr5dvvIQBDti2GnVtTSKM+5HOW7c9zt5v0HYyXGaJp3oNLjTWiDUoxRoruW5l5ouIb2bJf475F+vdWKvfEiabB10rwcGyCrG1o9vGBihvyx+mYsyCMRMa4v6opgt4NG8nFp21p5OanGppdKfaCVxCtPBxqVIExS4VahWkPvA3+hXJACKMx0tFKVnR0IOYHYDwsvdZPx2u5FGhbAwUZ/8wVhOeymPpM7OytRS0xDp3INLxGN4DoNOyyvihnFdjlygcu9u3YCpA35QsD9WvmDBnVnnZ+OQ460CncbLFzhjHZYKHVVVg1dYFUuHUDBBxH6nHChcBjn0/y65aqZq0Khjj/DJOS6nGE2Aq42VOlXxJCRMtpEkf6Ue708eInDgbl74aPD4nOIDrtT7NKdIB4iPy5DbPTb9rsS2m7HZT5MiE1cPMa8FCu+G8Yz0h+vrsqlBl0dzFEMVJG8AoGRRDb+qlDZl+UQc0SSIzqbOc8xvcdKn414vuLsaVhy+kJ8zaPTRkvh1+cCIAEjxs0nOxzA2Yd5O X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e996c16b-5f2f-4c44-0ea4-08d978204183 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3405.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 08:10:18.4839 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JsLdenZLODDAcEBdCgMbRwykjSOB9UTvzwK82RN2zNiakNqiIHUj6IZE0aeW6/H8+G5B+c6c0m3HHVcxjOKqdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7085 Precedence: bulk List-ID: <linux-acpi.vger.kernel.org> X-Mailing-List: linux-acpi@vger.kernel.org |
Series |
[v3] software node: balance refcount for managed sw nodes
|
expand
|
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index d1f1a8240120..bdb50a06c82a 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -1113,6 +1113,9 @@ int device_create_managed_software_node(struct device *dev, to_swnode(fwnode)->managed = true; set_secondary_fwnode(dev, fwnode); + if (device_is_registered(dev)) + software_node_notify(dev, KOBJ_ADD); + return 0; } EXPORT_SYMBOL_GPL(device_create_managed_software_node);