treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 291
[linux-block.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_mdio.c
index bdd351597b55251b35e17daf43aeff643912e33b..1341bb5f693c08b29c36e4bca387f529b415ae17 100644 (file)
@@ -1,20 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*******************************************************************************
   STMMAC Ethernet Driver -- MDIO bus implementation
   Provides Bus interface for MII registers
 
   Copyright (C) 2007-2009  STMicroelectronics Ltd
 
-  This program is free software; you can redistribute it and/or modify it
-  under the terms and conditions of the GNU General Public License,
-  version 2, as published by the Free Software Foundation.
-
-  This program is distributed in the hope it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  more details.
-
-  The full GNU General Public License is included in this distribution in
-  the file called "COPYING".
 
   Author: Carl Shaw <carl.shaw@st.com>
   Maintainer: Giuseppe Cavallaro <peppe.cavallaro@st.com>
@@ -267,7 +257,8 @@ int stmmac_mdio_reset(struct mii_bus *bus)
                        of_property_read_u32_array(np,
                                "snps,reset-delays-us", data->delays, 3);
 
-                       if (gpio_request(data->reset_gpio, "mdio-reset"))
+                       if (devm_gpio_request(priv->device, data->reset_gpio,
+                                             "mdio-reset"))
                                return 0;
                }