Commit a7687fec authored by Jason Kim's avatar Jason Kim Committed by Hans Verkuil

media: mc-device: remove unnecessary __must_check

In the file mc-device.c, the function
media_device_register_entity_notify() does not need to have the
__must_check attribute since it returns only a value of 0.
Therefore, we can remove this attribute and change the function's
return type.
Signed-off-by: default avatarJason Kim <sukbeom.kim@gmail.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 2649c1a2
...@@ -756,13 +756,12 @@ int __must_check __media_device_register(struct media_device *mdev, ...@@ -756,13 +756,12 @@ int __must_check __media_device_register(struct media_device *mdev,
} }
EXPORT_SYMBOL_GPL(__media_device_register); EXPORT_SYMBOL_GPL(__media_device_register);
int __must_check media_device_register_entity_notify(struct media_device *mdev, void media_device_register_entity_notify(struct media_device *mdev,
struct media_entity_notify *nptr) struct media_entity_notify *nptr)
{ {
mutex_lock(&mdev->graph_mutex); mutex_lock(&mdev->graph_mutex);
list_add_tail(&nptr->list, &mdev->entity_notify); list_add_tail(&nptr->list, &mdev->entity_notify);
mutex_unlock(&mdev->graph_mutex); mutex_unlock(&mdev->graph_mutex);
return 0;
} }
EXPORT_SYMBOL_GPL(media_device_register_entity_notify); EXPORT_SYMBOL_GPL(media_device_register_entity_notify);
......
...@@ -627,14 +627,9 @@ static int au0828_media_device_register(struct au0828_dev *dev, ...@@ -627,14 +627,9 @@ static int au0828_media_device_register(struct au0828_dev *dev,
/* register entity_notify callback */ /* register entity_notify callback */
dev->entity_notify.notify_data = (void *) dev; dev->entity_notify.notify_data = (void *) dev;
dev->entity_notify.notify = (void *) au0828_media_graph_notify; dev->entity_notify.notify = (void *) au0828_media_graph_notify;
ret = media_device_register_entity_notify(dev->media_dev, media_device_register_entity_notify(dev->media_dev,
&dev->entity_notify); &dev->entity_notify);
if (ret) {
dev_err(&udev->dev,
"Media Device register entity_notify Error: %d\n",
ret);
return ret;
}
/* set enable_source */ /* set enable_source */
mutex_lock(&dev->media_dev->graph_mutex); mutex_lock(&dev->media_dev->graph_mutex);
dev->media_dev->source_priv = (void *) dev; dev->media_dev->source_priv = (void *) dev;
......
...@@ -364,7 +364,7 @@ void media_device_unregister_entity(struct media_entity *entity); ...@@ -364,7 +364,7 @@ void media_device_unregister_entity(struct media_entity *entity);
* media_entity_notify callbacks are invoked. * media_entity_notify callbacks are invoked.
*/ */
int __must_check media_device_register_entity_notify(struct media_device *mdev, void media_device_register_entity_notify(struct media_device *mdev,
struct media_entity_notify *nptr); struct media_entity_notify *nptr);
/** /**
...@@ -444,11 +444,10 @@ static inline int media_device_register_entity(struct media_device *mdev, ...@@ -444,11 +444,10 @@ static inline int media_device_register_entity(struct media_device *mdev,
static inline void media_device_unregister_entity(struct media_entity *entity) static inline void media_device_unregister_entity(struct media_entity *entity)
{ {
} }
static inline int media_device_register_entity_notify( static inline void media_device_register_entity_notify(
struct media_device *mdev, struct media_device *mdev,
struct media_entity_notify *nptr) struct media_entity_notify *nptr)
{ {
return 0;
} }
static inline void media_device_unregister_entity_notify( static inline void media_device_unregister_entity_notify(
struct media_device *mdev, struct media_device *mdev,
......
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