[media] media_entity: remove gfp_flags argument
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 9 Sep 2015 11:19:25 +0000 (08:19 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:02 +0000 (12:19 -0200)
We should not be creating device nodes at IRQ contexts. So,
the only flags we'll be using will be GFP_KERNEL. Let's
remove the gfp_flags, in order to make the interface simpler.

If we ever need it, it would be easy to revert those changes.

While here, remove an extra blank line.

Suggested-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-core/dvbdev.c
drivers/media/media-entity.c
drivers/media/v4l2-core/v4l2-dev.c
include/media/media-entity.h

index cc52c24bff7252c83739789f01cd2901e61e42b5..1d4e35693d09d7b0fd5839ab0bf5ae761fe3e98e 100644 (file)
@@ -394,8 +394,7 @@ static int dvb_register_media_device(struct dvb_device *dvbdev,
 
        dvbdev->intf_devnode = media_devnode_create(dvbdev->adapter->mdev,
                                                    intf_type, 0,
-                                                   DVB_MAJOR, minor,
-                                                   GFP_KERNEL);
+                                                   DVB_MAJOR, minor);
 
        if (!dvbdev->intf_devnode)
                return -ENOMEM;
index 246d7e65adedbf363fd3f0aa3c8ca43fd34ab6df..5f61642b2a977a8d3b076a7653645225e0f86ea3 100644 (file)
@@ -866,12 +866,11 @@ static void media_interface_init(struct media_device *mdev,
 
 struct media_intf_devnode *media_devnode_create(struct media_device *mdev,
                                                u32 type, u32 flags,
-                                               u32 major, u32 minor,
-                                               gfp_t gfp_flags)
+                                               u32 major, u32 minor)
 {
        struct media_intf_devnode *devnode;
 
-       devnode = kzalloc(sizeof(*devnode), gfp_flags);
+       devnode = kzalloc(sizeof(*devnode), GFP_KERNEL);
        if (!devnode)
                return NULL;
 
index ed96642c27bf746004fe99aa11c5a261cab5b12d..d8e5994cccf1a68151cdef9a2a1568da24dee531 100644 (file)
@@ -786,8 +786,7 @@ static int video_register_media_controller(struct video_device *vdev, int type)
        vdev->intf_devnode = media_devnode_create(vdev->v4l2_dev->mdev,
                                                  intf_type,
                                                  0, VIDEO_MAJOR,
-                                                 vdev->minor,
-                                                 GFP_KERNEL);
+                                                 vdev->minor);
        if (!vdev->intf_devnode) {
                media_device_unregister_entity(&vdev->entity);
                return -ENOMEM;
index df84e8eeb24b78e7312e70dfe6b988275d52c141..cd3f3a77df2d78280b7d810cd43237c3ba3ee279 100644 (file)
@@ -71,7 +71,6 @@ struct media_gobj {
        struct list_head        list;
 };
 
-
 struct media_pipeline {
 };
 
@@ -378,8 +377,7 @@ void media_entity_pipeline_stop(struct media_entity *entity);
 struct media_intf_devnode *
 __must_check media_devnode_create(struct media_device *mdev,
                                  u32 type, u32 flags,
-                                 u32 major, u32 minor,
-                                 gfp_t gfp_flags);
+                                 u32 major, u32 minor);
 void media_devnode_remove(struct media_intf_devnode *devnode);
 struct media_link *
 __must_check media_create_intf_link(struct media_entity *entity,