diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c index ca6ce6702..923b2188c 100644 --- a/spa/plugins/alsa/alsa-udev.c +++ b/spa/plugins/alsa/alsa-udev.c @@ -31,9 +31,11 @@ #define MAX_CARDS 64 -#define ACTION_ADD 0 -#define ACTION_REMOVE 1 -#define ACTION_DISABLE 2 +enum action { + ACTION_ADD, + ACTION_REMOVE, + ACTION_DISABLE, +}; /* Used for unavailable devices in the card structure. */ #define ID_DEVICE_NOT_SUPPORTED 0 @@ -718,7 +720,7 @@ static bool check_access(struct impl *this, struct card *card) return card->accessible; } -static void process_card(struct impl *this, uint32_t action, struct udev_device *udev_device) +static void process_card(struct impl *this, enum action action, struct udev_device *udev_device) { unsigned int card_nr; struct card *card; diff --git a/spa/plugins/v4l2/v4l2-udev.c b/spa/plugins/v4l2/v4l2-udev.c index 733f3da2a..c2a350cd9 100644 --- a/spa/plugins/v4l2/v4l2-udev.c +++ b/spa/plugins/v4l2/v4l2-udev.c @@ -28,9 +28,11 @@ #define MAX_DEVICES 64 -#define ACTION_ADD 0 -#define ACTION_REMOVE 1 -#define ACTION_DISABLE 2 +enum action { + ACTION_ADD, + ACTION_REMOVE, + ACTION_DISABLE, +}; struct device { uint32_t id; @@ -357,7 +359,7 @@ static bool check_access(struct impl *this, struct device *device) return device->accessible; } -static void process_device(struct impl *this, uint32_t action, struct udev_device *dev) +static void process_device(struct impl *this, enum action action, struct udev_device *dev) { uint32_t id; struct device *device;