powerpc/powermac: Remove pmac_low_i2c_{lock,unlock}()
Subsystems (2)
PATCH 1/1 powerpc/powermac: Remove pmac_low_i2c_{lock,unlock}()
I haven't been able to find any callers of the functions mentioned in the subject in the kernel tree nor in the history of the kernel tree. Hence, remove these two functions.
--- arch/powerpc/include/asm/pmac_low_i2c.h | 4 --- arch/powerpc/platforms/powermac/low_i2c.c | 34 ----------------------- 2 files changed, 38 deletions(-)
arch/powerpc/include/asm/pmac_low_i2c.h +0 -4
@@ -79,10 +79,6 @@ extern int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter); -/* (legacy) Locking functions exposed to i2c-keywest */ -extern int pmac_low_i2c_lock (struct device_node *np); -extern int pmac_low_i2c_unlock (struct device_node *np); -/* Access functions for platform code */ extern int pmac_i2c_open (struct pmac_i2c_bus *bus,int polled);extern void pmac_i2c_close (struct pmac_i2c_bus *bus);
arch/powerpc/platforms/powermac/low_i2c.c +0 -34
@@ -1058,40 +1058,6 @@ int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter) }EXPORT_SYMBOL_GPL (pmac_i2c_match_adapter); -int pmac_low_i2c_lock (struct device_node *np) -{ -struct pmac_i2c_bus *bus, *found =NULL ; - -list_for_each_entry (bus, &pmac_i2c_busses, link) { -if (np == bus->controller) { - found = bus; -break ; - } - } -if (!found) -return -ENODEV ; -return pmac_i2c_open (bus,0 ); -} -EXPORT_SYMBOL_GPL (pmac_low_i2c_lock); - -int pmac_low_i2c_unlock (struct device_node *np) -{ -struct pmac_i2c_bus *bus, *found =NULL ; - -list_for_each_entry (bus, &pmac_i2c_busses, link) { -if (np == bus->controller) { - found = bus; -break ; - } - } -if (!found) -return -ENODEV ; -pmac_i2c_close (bus); -return 0 ; -} -EXPORT_SYMBOL_GPL (pmac_low_i2c_unlock); - -int pmac_i2c_open (struct pmac_i2c_bus *bus,int polled) {int rc;
Le 13/03/2026 à 20:44, Bart Van Assche a écrit :
Quoted 3 lines
I haven't been able to find any callers of the functions mentioned in the subject in the kernel tree nor in the history of the kernel tree. Hence, remove these two functions.
As far as I can see it was used by i2c-keywest driver until commit a28d3af2a26c ("[PATCH] 2/5 powerpc: Rework PowerMac i2c part 2")
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(np))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);Quoted 2 lines
Signed-off-by Bart Van Assche <[email protected]>
Quoted 65 lines
--- arch/powerpc/include/asm/pmac_low_i2c.h | 4 --- arch/powerpc/platforms/powermac/low_i2c.c | 34 ----------------------- 2 files changed, 38 deletions(-)arch/powerpc/include/asm/pmac_low_i2c.h +0
-4@@ -79,10 +79,6 @@ extern int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter); -/* (legacy) Locking functions exposed to i2c-keywest */ -extern int pmac_low_i2c_lock (struct device_node *np); -extern int pmac_low_i2c_unlock (struct device_node *np); -/* Access functions for platform code */ extern int pmac_i2c_open (struct pmac_i2c_bus *bus,int polled);extern void pmac_i2c_close (struct pmac_i2c_bus *bus);arch/powerpc/platforms/powermac/low_i2c.c +0
-34@@ -1058,40 +1058,6 @@ int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter) }EXPORT_SYMBOL_GPL (pmac_i2c_match_adapter); -int pmac_low_i2c_lock (struct device_node *np) -{ -struct pmac_i2c_bus *bus, *found =NULL ; - -list_for_each_entry (bus, &pmac_i2c_busses, link) { -if (np == bus->controller) { - found = bus; -break ; - } - } -if (!found) -return -ENODEV ; -return pmac_i2c_open (bus,0 ); -} -EXPORT_SYMBOL_GPL (pmac_low_i2c_lock); - -int pmac_low_i2c_unlock (struct device_node *np) -{ -struct pmac_i2c_bus *bus, *found =NULL ; - -list_for_each_entry (bus, &pmac_i2c_busses, link) { -if (np == bus->controller) { - found = bus; -break ; - } - } -if (!found) -return -ENODEV ; -pmac_i2c_close (bus); -return 0 ; -} -EXPORT_SYMBOL_GPL (pmac_low_i2c_unlock); - -int pmac_i2c_open (struct pmac_i2c_bus *bus,int polled) {int rc;
Quoted 1 line · Christophe Leroy (CS GROUP)
As far as I can see it was used by i2c-keywest driver until commit
a28d3af2a26c("[PATCH] 2/5 powerpc: Rework PowerMac i2c part 2")
Thanks Christophe for the feedback. I will integrate your feedback in a new version of this patch and post it soon.
Bart.