All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: [PATCH 9/9] ALSA: firewire-lib: delete unused kernel API
Date: Mon,  7 Jun 2021 17:12:50 +0900	[thread overview]
Message-ID: <20210607081250.13397-10-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20210607081250.13397-1-o-takashi@sakamocchi.jp>

No driver use snd_fw_schedule_registration(). Let's delete it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/lib.c | 32 --------------------------------
 sound/firewire/lib.h |  3 ---
 2 files changed, 35 deletions(-)

diff --git a/sound/firewire/lib.c b/sound/firewire/lib.c
index 85c4f4477c7f..e0a2337e8f27 100644
--- a/sound/firewire/lib.c
+++ b/sound/firewire/lib.c
@@ -67,38 +67,6 @@ int snd_fw_transaction(struct fw_unit *unit, int tcode,
 }
 EXPORT_SYMBOL(snd_fw_transaction);
 
-#define PROBE_DELAY_MS		(2 * MSEC_PER_SEC)
-
-/**
- * snd_fw_schedule_registration - schedule work for sound card registration
- * @unit: an instance for unit on IEEE 1394 bus
- * @dwork: delayed work with callback function
- *
- * This function is not designed for general purposes. When new unit is
- * connected to IEEE 1394 bus, the bus is under bus-reset state because of
- * topological change. In this state, units tend to fail both of asynchronous
- * and isochronous communication. To avoid this problem, this function is used
- * to postpone sound card registration after the state. The callers must
- * set up instance of delayed work in advance.
- */
-void snd_fw_schedule_registration(struct fw_unit *unit,
-				  struct delayed_work *dwork)
-{
-	u64 now, delay;
-
-	now = get_jiffies_64();
-	delay = fw_parent_device(unit)->card->reset_jiffies
-					+ msecs_to_jiffies(PROBE_DELAY_MS);
-
-	if (time_after64(delay, now))
-		delay -= now;
-	else
-		delay = 0;
-
-	mod_delayed_work(system_wq, dwork, delay);
-}
-EXPORT_SYMBOL(snd_fw_schedule_registration);
-
 MODULE_DESCRIPTION("FireWire audio helper functions");
 MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
 MODULE_LICENSE("GPL v2");
diff --git a/sound/firewire/lib.h b/sound/firewire/lib.h
index dc815dc3933e..664dfdb9e58d 100644
--- a/sound/firewire/lib.h
+++ b/sound/firewire/lib.h
@@ -23,7 +23,4 @@ static inline bool rcode_is_permanent_error(int rcode)
 	return rcode == RCODE_TYPE_ERROR || rcode == RCODE_ADDRESS_ERROR;
 }
 
-void snd_fw_schedule_registration(struct fw_unit *unit,
-				  struct delayed_work *dwork);
-
 #endif
-- 
2.27.0


  parent reply	other threads:[~2021-06-07  8:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  8:12 [PATCH 0/9] ALSA: firewire: cease from delayed card registration Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 1/9] ALSA: bebob: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 2/9] ALSA: fireworks: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 3/9] ALSA: oxfw: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 4/9] ALSA: dice: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 5/9] ALSA: firewire-digi00x: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 6/9] ALSA: firewire-tascam: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 7/9] ALSA: firewire-motu: " Takashi Sakamoto
2021-06-07  8:12 ` [PATCH 8/9] ALSA: fireface: " Takashi Sakamoto
2021-06-07  8:12 ` Takashi Sakamoto [this message]
2021-06-07 15:15 ` [PATCH 0/9] ALSA: firewire: " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210607081250.13397-10-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.