Skip to content

Commit 8145671

Browse files
committed
firewire: core: minor code refactoring to localize table of gap count
The table for gap count is accessed by a single function. In this case, it can be localized to the function. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent aef6bcc commit 8145671

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/firewire/core-card.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,6 @@ static void allocate_broadcast_channel(struct fw_card *card, int generation)
273273
fw_device_set_broadcast_channel);
274274
}
275275

276-
static const char gap_count_table[] = {
277-
63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
278-
};
279-
280276
void fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
281277
{
282278
fw_card_get(card);
@@ -286,6 +282,9 @@ void fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
286282

287283
static void bm_work(struct work_struct *work)
288284
{
285+
static const char gap_count_table[] = {
286+
63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
287+
};
289288
struct fw_card *card = from_work(card, work, bm_work.work);
290289
struct fw_device *root_device, *irm_device;
291290
struct fw_node *root_node;

0 commit comments

Comments
 (0)