Skip to contentSkip to conversation

pinctrl: mpfs-mssio: remove unused mutex

PATCH In review Conor Dooley 2 participants 2 messages Oct 30 – Nov 5

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: mpfs-mssio: remove unused mutex

From: Conor Dooley <[email protected]>

The pinctrl core creates a mutex that is used to protect things like the generic dt node mapping functions. The (currently) unused mutex was added when the driver was in RFC state and contained a custom dt node mapping function, and used the driver's own mutex to protect it. The driver probably could have borrowed the core's, but this is moot since the merged version of the driver no longer has a custom dt node mapper. Remove the unused mutex.

---
CC: Conor Dooley <[email protected]>
CC: Valentina Fernandez <[email protected]>
CC: Daire McNamara <[email protected]>
CC: Linus Walleij <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c +0 -6
index 8da0c5312ce3..17c6d4190053 100644
@@ -56,7 +56,6 @@ struct mpfs_pinctrl {
 	struct device *dev;
 	struct regmap *regmap;
 	struct regmap *sysreg_regmap;
-	struct mutex mutex;
 	struct pinctrl_desc desc;
 };
 
@@ -677,7 +676,6 @@ static int mpfs_pinctrl_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mpfs_pinctrl *pctrl;
-	int ret;
 
 	pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
 	if (!pctrl)
@@ -703,10 +701,6 @@ static int mpfs_pinctrl_probe(struct platform_device *pdev)
 
 	pctrl->dev = dev;
 
-	ret = devm_mutex_init(dev, &pctrl->mutex);
-	if (ret)
-		return ret;
-
 	platform_set_drvdata(pdev, pctrl);
 
 	pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl);
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 11 lines · Conor Dooley

From: Conor Dooley <[email protected]>

The pinctrl core creates a mutex that is used to protect things like the generic dt node mapping functions. The (currently) unused mutex was added when the driver was in RFC state and contained a custom dt node mapping function, and used the driver's own mutex to protect it. The driver probably could have borrowed the core's, but this is moot since the merged version of the driver no longer has a custom dt node mapper. Remove the unused mutex.

Patch applied!

Yours,
Linus Walleij