From patchwork Tue Feb 7 14:15:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9560233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D51E6047A for ; Tue, 7 Feb 2017 14:16:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D66328422 for ; Tue, 7 Feb 2017 14:16:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00F0428429; Tue, 7 Feb 2017 14:16:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00 autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E41528422 for ; Tue, 7 Feb 2017 14:16:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cb6ZU-0003R6-SI; Tue, 07 Feb 2017 14:16:40 +0000 Received: from mail-dm3nam03on0074.outbound.protection.outlook.com ([104.47.41.74] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cb6Yo-0002XF-9L for linux-arm-kernel@lists.infradead.org; Tue, 07 Feb 2017 14:16:01 +0000 Received: from BN3PR0301CA0019.namprd03.prod.outlook.com (10.160.180.157) by BY2PR0301MB0728.namprd03.prod.outlook.com (10.160.63.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Tue, 7 Feb 2017 14:15:36 +0000 Received: from BN1BFFO11OLC003.protection.gbl (2a01:111:f400:7c10::1:160) by BN3PR0301CA0019.outlook.office365.com (2a01:111:e400:4000::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Tue, 7 Feb 2017 14:15:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11OLC003.mail.protection.outlook.com (10.58.145.14) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.888.7 via Frontend Transport; Tue, 7 Feb 2017 14:15:35 +0000 Received: from rhuath.am.freescale.net (rhuath.am.freescale.net [10.81.117.102]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v17EFXHW023812; Tue, 7 Feb 2017 07:15:34 -0700 From: To: Subject: [PATCH 01/10] staging: fsl-mc: drop root dprc counting Date: Tue, 7 Feb 2017 08:15:21 -0600 Message-ID: <20170207141530.12979-2-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170207141530.12979-1-laurentiu.tudor@nxp.com> References: <20170207141530.12979-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131309505352890986; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39860400002)(39450400003)(39840400002)(39850400002)(39400400002)(39410400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(81156014)(356003)(2906002)(50986999)(38730400002)(8936002)(81166006)(85426001)(48376002)(305945005)(7416002)(86362001)(50466002)(105606002)(76176999)(8676002)(4326007)(110136004)(2876002)(1076002)(106466001)(33646002)(6666003)(50226002)(47776003)(36756003)(6916009)(104016004)(5003940100001)(2351001)(2950100002)(8656002)(626004)(92566002)(77096006)(97736004)(68736007)(53936002)(189998001)(86152003)(5660300001)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0728; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC003; 1:1FXYBURJuPoI+sKCOhyAxtL/1UEVIW6BMDrB3u21WQu9TbDENN1poucve6BH60xmncZl2AzOxtPzIVKvQRUPQ/n0F5RKnUnkKen/UBtQqZMavYt1qQqm5l825qSTtKswbiq9W7J28pQKcWXjAodhSpDenqWjFKWZ+FeDLTdtbFhAw5OwmUZHNfLM0iblWmz+BHWK8lHAezOJt42WRXCflLDxHzx+9+9zrIemv+zr35TAWy5EVk3k8nIEafW992k3q4CbSvDFY0JcB7P6N5c1pX4V+vIwiSKVlVKRnI110lSzh2do6aL2rzBhccj0Gt0Z3bzukMECLrBOKXWpOlXxQe5ndqU+gRxHrX2lXYvEoZyl6JtSzMVQuGcmYDDFWSKHJunPJgL037M4SSKkMQcutN7npDCgu6MzOmOwlQJEOE+x32P1Z69BwL66yFeADzS5kXhA9JQLxDlHA+9IUbgjDd5jeJFH9+QtwXKEdRwNu1cXmo0FKG20V1JFWCX/zhKc7qvn54qZYBwODlhQWI+B1xGX2PVE8iZMEOZRo7CLwBuUtBXKa9g1P2iB6VG80ZcNbL9Uel2NaeaxIrM+UcyG2x+h9XUlQ1F0ovfHPPh0oxGaH0KnFkPwg33+yYRYMq1mHD4UL6eE6WvAtTe4t2lhFMsqaISB4xxA5fNwS8vN4amKrLQTlm7mxYkmznBjqIjF445JAQTPkV3Q3fnGV3ZQ5Zwpqtt/+2Whq2QgMTQ5yCd1aQQcSalnkmdGRtTEwZn+Fns3FSBedx8z7RiBjZawhA== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d77ab21a-a020-4852-fa6a-08d44f63c8a7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 3:5W78FYXZefHxlZImfChQtWC9SDp5LDxx9Z5adeLgSvRC8QZd5oQUAiNCR7tXnFXxGeNWAVi9gRkP3MZbrD7o6gvsuOgaiTxgoWcLQ112eMks1J/NpUknDDDOzmGoDwJ0JB29N/9PrmvFBZSmwP/sL2ECTEGA7XOPvOIMqnRVwZt2XgO+58M7nR6Sn9WeisKrWkEUyg7APbkozK2CtIhRbfB1L+L2LSEHAX2AdETOajiw1bZjL63nsl3qlUj3PuliCJAdD4qKdAw9Z8gV/UVIMQ8s6TRMadOCH5Q7lzUYbTc2Z+A7r5JRMWMK8Tbg7bEtkFT0bBQtcoi8kEF86eHBjH8WdLXMWQA89P2dKGsfk5h1A77VtqGPDXaCy/DWQ2sc; 25:us66TjcbTKU2vBS5fidfB1IvJG8el+4hXgVQJ1jTSZPIs3Ai5D40u+7tf8YHIFVPcDM3aSEsMNKBsuhdyntGzkRsctbtsb+SCEExKTIHILTmYArPLLdM/HkpNfcd297UYRdI3j5pni/4N8VHC57gbnsPo94Phfl8fAvrzyQ0dZaKoAPFW6hYMHAE0ijwsXeFy0LLTahEKiwxG35fZkQfJOIpvXNFAOr320uWwbl+dSUtLQQSRzDy7E/O7ZWBdQ+T+aKsLpK530b65XXB3BhU1pDYJHWCWSSC9HV2PZUpv6BGQB2YydZRdnwu1DpZ6xs5NZSln2itN+4LwVxUsojkHVf/vwpJQiX/Sk6z8ZlqixPR0uPREaXIK3bJ9IWeYCPEUx9EoHEl7AuujoewXfU5CxFwYQZyZu7dcfQrWHedFLQJEyEJXDkezb9/K7/pUf1mn5CQempBhJCMAbWlNFC6Fg== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 31:3lKXi3LiK6ntASbybSGiU3M3ekIxp5minO7X3uFMJFhWS69VjtapJz7xEpa/4Ec+qxx7glVjw7QMxqVKBIyFmZ1au3GYtxtMGHqyPp1ROZkChkYzBNhwtQ1I3uQfgMV4hI28P6az/knyYXBoWW8UymomF7lF74nkvEqnbUW1CtvJ95GwFK2E3iG82BSjRytKYbDLLfuzj+g+rNaDxsLZWAZPbHggaw8aBk+Uz7b9I6XOQXXEGwBYsJmqO2JYYRrlhtyU10zqZ7L5/smr2ULc85jNzkM5SkpESrmIOlRK/tg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(5005006)(2017020603029)(13023025)(13017025)(8121501046)(20170203043)(13015025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123559025)(20161123563025)(20161123565025)(20161123556025)(20161123561025); SRVR:BY2PR0301MB0728; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 4:XXJojTg9bB+DLV6p5j5US4S0PCPt+8iAb7y+dI4VosR85rlQrbiqZqAv6UlcPE/DtNRPTnYqtrNu7v1xfI2ANRIGwBqTT9FEzZmZ+1oOzBr0YF7J1YX2xh3bvX+zBXAWGG2C0tUT1gIZ0nDjQVVKh+3y+9mI0DVf+i8HSB7En1HYGpO7n5rQq4nhKVzc2f5trW18/A1VSSiOVVaXETW62u0RHntiEQdOUNoO8c2tQ9MfJCPQeyM0+MOl3i4dRwzAx0zPEVz1fr+1U20AFUzoATVF65CsbIyrSTbcvT4LhHq7spjnKk170L7STCu1Tuj0TKmhQUBJvu/I/nLiEQOWV3ZaTEOHOoswdajnYIL+YS5R+3oZ/gr9eX5LQEI86871QbOFZpXohzml6JAC8OC9t+G5QoiBJnHhoiJRJecLZK4lDaqD1WXl2Wz2m84K1hBqJwBOOVlIFymoTRyA6EgPSmUCzVNNzvMQpKtOTBXwUTbmXnHP3UJQCZeW1TRXdbZBwqKzw6ytnOHa+fhfamyE85r4T7iKsss99il5W5KRI/irkwE3srsz/LpFez9s4Nzgy8M4noGb5wEYjZJsv4j3eMqWiotEYSpBiGr+/jUfT3S1h6DOUI6/ZZlA7XIqk2U9fvThWJ6jeEDwU5yZZi8qAoB+h3ztUjkm6ZXl6MjKHTk3Casi7Tzd/mrAGf55pl/H8lkq7n18cdLhNpkkvI9yJT+gAKatdYCyZk5AKP8zUpc0PvyDRCNEc9v5yTRs4bNp/bUQ5DLMlIx6tLVfHyh4+3UXlw88+XaaDhW1sMx7G31vk1ukhLB36SlglXFBh993 X-Forefront-PRVS: 0211965D06 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0728; 23:ZTnEcp0PF+aSfj1AocmvmjDFCEB+D7K9u7554Re?= =?us-ascii?Q?vXmZT5dIpFJae2XbeSTJsASuzle+72iffE+jHd0k0R67gTxl3ypRfNdRI/SZ?= =?us-ascii?Q?gr5LE83OF0MXkJtWSLMCPXA3CAQCAKGAUXaquB3o2cCiMJWmhwJyTgEwTOnM?= =?us-ascii?Q?XxrHpJslmUNH7Jz30R7mAWJEYlHvuvY7vCOZtXwUskXvZhoBaNOrAGwAZm5g?= =?us-ascii?Q?21/jHJU1+GA/2sMY4xWkbIZw9ErR/MyAL8VM/dJaVP+JGeAN0fsyGV3JQBB1?= =?us-ascii?Q?FjXFWk73JE5aLfEFQjgCykPxH2Cn+Yp7y0iGJxeZ4GK0uV5l3XyPFe198Y/d?= =?us-ascii?Q?mInM5ryO1za4IRaKFRBg8791AqvgWDY582MpbCdEGbS1ss5L+KJJ8Num+qzl?= =?us-ascii?Q?j8HV1Xbcvn4DzUnnLnjgaIXiwoj+TysufYnclMBCaxWm/mnLb6LDQmZFXbTT?= =?us-ascii?Q?XDHTsDWNVU1ReQcB4u1MZSx9M3HiSWHO+/bRj2jUKraWBtYtP7rI8YIP48/d?= =?us-ascii?Q?dNQrBT357TXbKqLSiVUNwF6o0KIH7SjlG3mvpA+2a7G8iA5NrQTINDgD/F5Q?= =?us-ascii?Q?U6eqXHVvG+GFltjNa+olY/lklw4qDK2Jiimrq7rKhL/7BybA0BVfxSbHf1gL?= =?us-ascii?Q?g/9CO9PNucfT6biJ1Kq5H0byNrDhxeStfbUPDkdTcvw0jNA6vdr6F3b3kk5s?= =?us-ascii?Q?rTpE/zDsgp4puLcIInUckUpDydvJ1KiB7yfsZtlQWcv26S9ZAVWo2EokkyU3?= =?us-ascii?Q?dQcV8pmjGDX03YjttxXNaiZqJYqEhQKs1nw+Huj8Dj4tsY4AkkyotjLj4d0E?= =?us-ascii?Q?HidJhx/3A1uDgALcnXbi73Lf7K+jRcGBYq20WdveivSo9MWDUeJNnTh21aBb?= =?us-ascii?Q?v/4NusYd6TEWqt1abz4GzR5GIGfEjltinDjthjKkbeIazUdoancId9Ch/rHt?= =?us-ascii?Q?ydg9dnTVhPgpJJRhvtQhswvw36+prkKYbdOo+J6xztE8M7w4kl8JyXcuea36?= =?us-ascii?Q?QXu26A/AVasMo5p4mhn21yJvcairKWj+RozuIXquxboYUUnwPnzeU+6TQjbI?= =?us-ascii?Q?SOvu12qKngB7exFEkhurbh0vinmm4cX1Wqw/fguW6/IqbOuBLXQmXNSR17yw?= =?us-ascii?Q?zGhP2bJH7eCT+mcFNKfC4X1eeQmtSM8yefvWbSiU5KPGCErAX4wYxj03t29x?= =?us-ascii?Q?NEacOVDch3+C5xTi72o12JkO+HO47V5zSkAsg9MqgnjofMtM1H9KHlIMAnGi?= =?us-ascii?Q?z9h8utdwNMLRWFJka1Y6WRatW9DHVPBazK0pEkRf+xtYqiU03yks4SMSMMki?= =?us-ascii?Q?j06FHTW/jN187QqKeanyFc5V2wO0PXQWBLQvFf7tz7usCLXuLwHD6S0Gs78P?= =?us-ascii?Q?TBLsLIMpVRW/4KXDi+y/0NVVPnvo=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 6:IbnUaHgcyd1TNkjjr64TQl27uRDM8IPz77DeBw+Vi8eukw10cd/YuPOjmtq7+L3Zfrs84O0wfxW2S1VQPEIjiGngjfLsS6ANWekuoj1AMsNV7CtdagslXcuF6SdOHUqw3vbRtxlo3xIAsWMrHuxqEpmyt9zooC73CIAeAjUQ9hVwuChk0JVCvQe5HRfN5UdtGBP83Avh9oDLoQduH3Ss+UC/jeXRU2HbNoO17F0R9ZYCK/uvL5U5Kcfzsyr4yV03GY/8ocoPTUGaXbRJtC5llRHnclHM+QGFc3UGBEdSD7OeKfbaRybIeS9TD5Clv25wDgsJ0MNhWXbIBkvfovN0a2O43606WrnhALXGdO2UFPaR3SARtLx+Ul9akWD1cx1Vy6HrpZwPN9h3dQoX9Ignm0Vbz+/RvXWEul3ZoUEW6VY=; 5:KB8pjThJZxM27AxnMSq58+132vpRu5/HoXKSsE92OWPjiolor0mdwOlYC4w+Ub2Y9iKrKeLDu8lBu9gTbFAixWw8vSDGdwBPdbeOZOKuynd8f5GLW4ljRy3Mc7/zxqvXBNhkYeoS7rgF6ct6VQKUo9yre31XibeYuj4LRXrNMYjAf+ZOzHjUfSKgIS71cNMv; 24:1/Gyy2yuR4mw4z7/Kl0ngobznR3hEJyypM2CbutZmY+GDBJDTlSorz0QtilWsGySDBDeFpJS5OMK9MSL69qjAK3ulObrc09MsLv919cMNy4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 7:kZi6I7nWlj6zOhnhCJLTcLjKeVxyEUzKZ+rSPpuk0Nc3UcCTAsW4ij0fPGbiKpJhtTVAUDCnOsAVnsC43/Lp0jK97FjpACt5l2nAYDiAJTNfwpstOG2uyDrr4jarwpGC38Zfv4082+LOmnCxifps2vQYbucvM5DYETBiGst4OHAy9tCEJXlxmsKWAv5I3ummuA0WGVMyRuXDu6KM3ZWcWlBLelXVWU1ASHnuolo4zO1wNWhqlkoA+CyK0pQUGdF6YFfEM3a6+m9bR6IO6oZtFDnBCo/pRr332NvzT/IWwYq0vpvbjiCYQRlUggynvXOy4wMTlsZ3KV21gjvvMnPY71sQeZsJfJUEkGKKH995pWUc7ZKYcrRJlvtuePhfn3ZnQpMcKfMaAK7p8MN1H1ADbf0mRxGksDrbA55Gz19MW7Qet2d1G+CJhwcfPpKVXQvqDYTB1yjQQdUN4yFhO9Y1ksTj9IyAKErGZ/3XzeqlUm4Ge1Nmr+uyDnuCsg0MNcAQiXtALOuM1YB0qdh9FBV38Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2017 14:15:35.0083 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0728 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170207_061558_475285_6B122530 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, arnd@arndb.de, ruxandra.radulescu@nxp.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, catalin.horghidan@nxp.com, linux-arm-kernel@lists.infradead.org, ioana.ciornei@nxp.com, leoyang.li@nxp.com, bharat.bhushan@nxp.com, stuart.yoder@nxp.com, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor It was used just to sanity check some obscure cases that are unlikely to ever happen. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c index 5ac373c..cc20dc4 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c @@ -77,9 +77,6 @@ static int fsl_mc_bus_match(struct device *dev, struct device_driver *drv) struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(drv); bool found = false; - if (WARN_ON(!fsl_mc_bus_exists())) - goto out; - if (!mc_drv->match_id_table) goto out; @@ -149,8 +146,6 @@ struct bus_type fsl_mc_bus_type = { }; EXPORT_SYMBOL_GPL(fsl_mc_bus_type); -static atomic_t root_dprc_count = ATOMIC_INIT(0); - static int fsl_mc_driver_probe(struct device *dev) { struct fsl_mc_driver *mc_drv; @@ -246,15 +241,6 @@ void fsl_mc_driver_unregister(struct fsl_mc_driver *mc_driver) EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister); /** - * fsl_mc_bus_exists - check if a root dprc exists - */ -bool fsl_mc_bus_exists(void) -{ - return atomic_read(&root_dprc_count) > 0; -} -EXPORT_SYMBOL_GPL(fsl_mc_bus_exists); - -/** * fsl_mc_get_root_dprc - function to traverse to the root dprc */ void fsl_mc_get_root_dprc(struct device *dev, @@ -506,8 +492,6 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, } mc_io2 = mc_io; - - atomic_inc(&root_dprc_count); } error = get_dprc_icid(mc_io2, obj_desc->id, &mc_dev->icid); @@ -588,17 +572,9 @@ void fsl_mc_device_remove(struct fsl_mc_device *mc_dev) device_del(&mc_dev->dev); put_device(&mc_dev->dev); - if (strcmp(mc_dev->obj_desc.type, "dprc") == 0) { + if (strcmp(mc_dev->obj_desc.type, "dprc") == 0) mc_bus = to_fsl_mc_bus(mc_dev); - if (fsl_mc_is_root_dprc(&mc_dev->dev)) { - if (atomic_read(&root_dprc_count) > 0) - atomic_dec(&root_dprc_count); - else - WARN_ON(1); - } - } - if (mc_bus) devm_kfree(mc_dev->dev.parent, mc_bus); else