mfd:mcp-core.c : Remove redundant driver match function
PATCH 1/1 mfd:mcp-core.c : Remove redundant driver match function
If there is no driver_match function, the driver core assumes that each candidate pair (driver, device)matches, see driver_match_device()
--- drivers/mfd/mcp-core.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/mfd/mcp-core.c +0 -6
@@ -20,11 +20,6 @@#define to_mcp (d) container_of(d, struct mcp, attached_device)#define to_mcp_driver (d) container_of(d, struct mcp_driver, drv) -static int mcp_bus_match (struct device *dev,struct device_driver *drv) -{ -return 1 ; -} -static int mcp_bus_probe (struct device *dev) {struct mcp *mcp =to_mcp (dev);
@@ -43,7 +38,6 @@ static void mcp_bus_remove(struct device *dev)static struct bus_type mcp_bus_type = { .name ="mcp" , - .match = mcp_bus_match, .probe = mcp_bus_probe, .remove = mcp_bus_remove, };
Signature · 1 line
2.34.1
Lee Jones
maintainerAs a nice exercise, I'd like you to fix the subject line please.
It should match the subsystem you're applying to, with no errors.
git log --oneline -- drivers/mfd is your friend here.
Quoted 2 lines · Lizhe
If there is no
driver_matchfunction, the driver core assumes that each candidate pair (driver, device)matches, seedriver_match_device()
Attention to detail please. This contains whitespace issues and a lack of punctuation.
Quoted 1 line
Signed-off-by Lizhe <[email protected]>
You should really be using your full name.
Quoted 21 lines
--- drivers/mfd/mcp-core.c | 6 ------ 1 file changed, 6 deletions(-)drivers/mfd/mcp-core.c +0
-5@@ -20,11 +20,6 @@#define to_mcp (d) container_of(d, struct mcp, attached_device)#define to_mcp_driver (d) container_of(d, struct mcp_driver, drv) -static int mcp_bus_match (struct device *dev,struct device_driver *drv) -{ -return 1 ; -} -static int mcp_bus_probe (struct device *dev) {struct mcp *mcp =to_mcp (dev);
drivers/mfd/mcp-core.c static void mcp_bus_remove(struct device *dev) · line 43
Quoted 7 lines
drivers/mfd/mcp-core.c +0
-1@@ -43,7 +38,6 @@ static void mcp_bus_remove(struct device *dev)static struct bus_type mcp_bus_type = { .name ="mcp" , - .match = mcp_bus_match, .probe = mcp_bus_probe, .remove = mcp_bus_remove, };
The code is fine.
--
Lee Jones [李琼斯]