Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mei: introduce host client uninitialized state

Introduce a new host client state, MEI_FILE_UNINITIALIZED,
to distinguish client objects that was unlinked,
but not destroyed and can be linked again.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Usyskin and committed by
Greg Kroah-Hartman
bd47b526 96bc8183

+5 -4
+3 -3
drivers/misc/mei/client.c
··· 571 571 INIT_LIST_HEAD(&cl->rd_pending); 572 572 INIT_LIST_HEAD(&cl->link); 573 573 cl->writing_state = MEI_IDLE; 574 - cl->state = MEI_FILE_INITIALIZING; 574 + cl->state = MEI_FILE_UNINITIALIZED; 575 575 cl->dev = dev; 576 576 } 577 577 ··· 672 672 673 673 list_del_init(&cl->link); 674 674 675 - cl->state = MEI_FILE_INITIALIZING; 675 + cl->state = MEI_FILE_UNINITIALIZED; 676 676 677 677 return 0; 678 678 } ··· 756 756 struct mei_device *dev = cl->dev; 757 757 758 758 if (cl->state == MEI_FILE_DISCONNECTED || 759 - cl->state == MEI_FILE_INITIALIZING) 759 + cl->state <= MEI_FILE_INITIALIZING) 760 760 return; 761 761 762 762 cl->state = MEI_FILE_DISCONNECTED;
+2 -1
drivers/misc/mei/mei_dev.h
··· 55 55 56 56 /* File state */ 57 57 enum file_state { 58 - MEI_FILE_INITIALIZING = 0, 58 + MEI_FILE_UNINITIALIZED = 0, 59 + MEI_FILE_INITIALIZING, 59 60 MEI_FILE_CONNECTING, 60 61 MEI_FILE_CONNECTED, 61 62 MEI_FILE_DISCONNECTING,