Commit 203d027d authored by Lukas Wunner's avatar Lukas Wunner Committed by Daniel Vetter

vga_switcheroo: Use enum vga_switcheroo_state instead of int

Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 235fabe0
......@@ -100,7 +100,7 @@
struct vga_switcheroo_client {
struct pci_dev *pdev;
struct fb_info *fb_info;
int pwr_state;
enum vga_switcheroo_state pwr_state;
const struct vga_switcheroo_client_ops *ops;
int id;
bool active;
......@@ -344,7 +344,7 @@ find_active_client(struct list_head *head)
*
* Return: Power state.
*/
int vga_switcheroo_get_client_state(struct pci_dev *pdev)
enum vga_switcheroo_state vga_switcheroo_get_client_state(struct pci_dev *pdev)
{
struct vga_switcheroo_client *client;
enum vga_switcheroo_state ret;
......@@ -496,7 +496,7 @@ static int vga_switchoff(struct vga_switcheroo_client *client)
return 0;
}
static void set_audio_state(int id, int state)
static void set_audio_state(int id, enum vga_switcheroo_state state)
{
struct vga_switcheroo_client *client;
......
......@@ -138,7 +138,7 @@ void vga_switcheroo_unregister_handler(void);
int vga_switcheroo_process_delayed_switch(void);
int vga_switcheroo_get_client_state(struct pci_dev *dev);
enum vga_switcheroo_state vga_switcheroo_get_client_state(struct pci_dev *dev);
void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic);
......@@ -157,7 +157,7 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev,
int id) { return 0; }
static inline void vga_switcheroo_unregister_handler(void) {}
static inline int vga_switcheroo_process_delayed_switch(void) { return 0; }
static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; }
static inline enum vga_switcheroo_state vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; }
static inline void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment