Skip to content

Commit

Permalink
mei: bus: export mei_cldev_enabled function
Browse files Browse the repository at this point in the history
Let me client device driver query of the device is connected
and hence enabled.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Sep 21, 2015
1 parent baeacd0 commit 01a14ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/misc/mei/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,19 @@ u8 mei_cldev_ver(const struct mei_cl_device *cldev)
}
EXPORT_SYMBOL_GPL(mei_cldev_ver);

/**
* mei_cldev_enabled - check whether the device is enabled
*
* @cldev: mei client device
*
* Return: true if me client is initialized and connected
*/
bool mei_cldev_enabled(struct mei_cl_device *cldev)
{
return cldev->cl && mei_cl_is_connected(cldev->cl);
}
EXPORT_SYMBOL_GPL(mei_cldev_enabled);

/**
* mei_cl_enable_device - enable me client device
* create connection with me client
Expand Down
1 change: 1 addition & 0 deletions include/linux/mei_cl_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@ void mei_cl_set_drvdata(struct mei_cl_device *device, void *data);

int mei_cl_enable_device(struct mei_cl_device *device);
int mei_cl_disable_device(struct mei_cl_device *device);
bool mei_cldev_enabled(struct mei_cl_device *cldev);

#endif /* _LINUX_MEI_CL_BUS_H */

0 comments on commit 01a14ed

Please sign in to comment.