Skip to content

Commit d6ce6bb

Browse files
takaswietiwai
authored andcommitted
ALSA: oxfw: rename a structure so that it means backward compatibility to old drivers
In former commits, some model-specific members are split from the structure. The structure is just to keep names for compatibility to old drivers. This commit arranges name of the structure and localize it. Signed-off-by: Takashi Sakamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 3e2f457 commit d6ce6bb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

sound/firewire/oxfw/oxfw.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ MODULE_AUTHOR("Clemens Ladisch <[email protected]>");
3030
MODULE_LICENSE("GPL v2");
3131
MODULE_ALIAS("snd-firewire-speakers");
3232

33+
struct compat_info {
34+
const char *driver_name;
35+
const char *vendor_name;
36+
const char *model_name;
37+
};
38+
3339
static bool detect_loud_models(struct fw_unit *unit)
3440
{
3541
const char *const models[] = {
@@ -59,7 +65,7 @@ static bool detect_loud_models(struct fw_unit *unit)
5965
static int name_card(struct snd_oxfw *oxfw)
6066
{
6167
struct fw_device *fw_dev = fw_parent_device(oxfw->unit);
62-
const struct device_info *info;
68+
const struct compat_info *info;
6369
char vendor[24];
6470
char model[32];
6571
const char *d, *v, *m;
@@ -87,7 +93,7 @@ static int name_card(struct snd_oxfw *oxfw)
8793
/* to apply card definitions */
8894
if (oxfw->entry->vendor_id == VENDOR_GRIFFIN ||
8995
oxfw->entry->vendor_id == VENDOR_LACIE) {
90-
info = (const struct device_info *)oxfw->entry->driver_data;
96+
info = (const struct compat_info *)oxfw->entry->driver_data;
9197
d = info->driver_name;
9298
v = info->vendor_name;
9399
m = info->model_name;
@@ -279,13 +285,13 @@ static void oxfw_remove(struct fw_unit *unit)
279285
snd_card_free_when_closed(oxfw->card);
280286
}
281287

282-
static const struct device_info griffin_firewave = {
288+
static const struct compat_info griffin_firewave = {
283289
.driver_name = "FireWave",
284290
.vendor_name = "Griffin",
285291
.model_name = "FireWave",
286292
};
287293

288-
static const struct device_info lacie_speakers = {
294+
static const struct compat_info lacie_speakers = {
289295
.driver_name = "FWSpeakers",
290296
.vendor_name = "LaCie",
291297
.model_name = "FireWire Speakers",

sound/firewire/oxfw/oxfw.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
#include "../amdtp-am824.h"
3232
#include "../cmp.h"
3333

34-
struct device_info {
35-
const char *driver_name;
36-
const char *vendor_name;
37-
const char *model_name;
38-
};
39-
4034
/* This is an arbitrary number for convinience. */
4135
#define SND_OXFW_STREAM_FORMAT_ENTRIES 10
4236
struct snd_oxfw {

0 commit comments

Comments
 (0)