]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: firewire: Remove unused cmp_connection_update
authorDr. David Alan Gilbert <linux@treblig.org>
Wed, 9 Oct 2024 00:36:53 +0000 (01:36 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 10 Oct 2024 12:22:01 +0000 (14:22 +0200)
cmp_connection_update() has been unused since 2019's commit
7eb7b18e9fc7 ("ALSA: fireworks: code refactoring for bus reset handler")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241009003653.254753-1-linux@treblig.org
sound/firewire/cmp.c
sound/firewire/cmp.h

index b596bec19774c8dfe49fa73370ac94bdd1876cb4..f5028a061a91ff9000e2ab2179c90c0374142f32 100644 (file)
@@ -333,53 +333,6 @@ retry_after_bus_reset:
 }
 EXPORT_SYMBOL(cmp_connection_establish);
 
-/**
- * cmp_connection_update - update the connection after a bus reset
- * @c: the connection manager
- *
- * This function must be called from the driver's .update handler to
- * reestablish any connection that might have been active.
- *
- * Returns zero on success, or a negative error code.  On an error, the
- * connection is broken and the caller must stop transmitting iso packets.
- */
-int cmp_connection_update(struct cmp_connection *c)
-{
-       int err;
-
-       mutex_lock(&c->mutex);
-
-       if (!c->connected) {
-               mutex_unlock(&c->mutex);
-               return 0;
-       }
-
-       err = fw_iso_resources_update(&c->resources);
-       if (err < 0)
-               goto err_unconnect;
-
-       if (c->direction == CMP_OUTPUT)
-               err = pcr_modify(c, opcr_set_modify, pcr_set_check,
-                                SUCCEED_ON_BUS_RESET);
-       else
-               err = pcr_modify(c, ipcr_set_modify, pcr_set_check,
-                                SUCCEED_ON_BUS_RESET);
-
-       if (err < 0)
-               goto err_unconnect;
-
-       mutex_unlock(&c->mutex);
-
-       return 0;
-
-err_unconnect:
-       c->connected = false;
-       mutex_unlock(&c->mutex);
-
-       return err;
-}
-EXPORT_SYMBOL(cmp_connection_update);
-
 static __be32 pcr_break_modify(struct cmp_connection *c, __be32 pcr)
 {
        return pcr & ~cpu_to_be32(PCR_BCAST_CONN | PCR_P2P_CONN_MASK);
index 26ab88000e34b5413dd5293b92dbe1abcda327a5..66fc08b742d2e0c939e680b6999744eaca276ea2 100644 (file)
@@ -47,7 +47,6 @@ int cmp_connection_reserve(struct cmp_connection *connection,
 void cmp_connection_release(struct cmp_connection *connection);
 
 int cmp_connection_establish(struct cmp_connection *connection);
-int cmp_connection_update(struct cmp_connection *connection);
 void cmp_connection_break(struct cmp_connection *connection);
 
 #endif