From 4c62e9764ab403d42f9b8871b1241fe7812f19d4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 21 Dec 2012 13:17:53 -0800 Subject: Drivers: media: remove __dev* attributes. CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton Cc: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/i2c/adv7180.c | 8 ++++---- drivers/media/i2c/adv7183.c | 2 +- drivers/media/i2c/as3645a.c | 10 +++++----- drivers/media/i2c/m5mols/m5mols_core.c | 8 ++++---- drivers/media/i2c/vs6624.c | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'drivers/media/i2c') diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 45ecf8d..64d71fb 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -540,8 +540,8 @@ static int init_device(struct i2c_client *client, struct adv7180_state *state) return 0; } -static __devinit int adv7180_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int adv7180_probe(struct i2c_client *client, + const struct i2c_device_id *id) { struct adv7180_state *state; struct v4l2_subdev *sd; @@ -587,7 +587,7 @@ err: return ret; } -static __devexit int adv7180_remove(struct i2c_client *client) +static int adv7180_remove(struct i2c_client *client) { struct v4l2_subdev *sd = i2c_get_clientdata(client); struct adv7180_state *state = to_state(sd); @@ -652,7 +652,7 @@ static struct i2c_driver adv7180_driver = { .name = KBUILD_MODNAME, }, .probe = adv7180_probe, - .remove = __devexit_p(adv7180_remove), + .remove = adv7180_remove, #ifdef CONFIG_PM .suspend = adv7180_suspend, .resume = adv7180_resume, diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index 10c3c1d..6fed5b7 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c @@ -677,7 +677,7 @@ static struct i2c_driver adv7183_driver = { .name = "adv7183", }, .probe = adv7183_probe, - .remove = __devexit_p(adv7183_remove), + .remove = adv7183_remove, .id_table = adv7183_id, }; diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c index 3bfdbf9..58d523f 100644 --- a/drivers/media/i2c/as3645a.c +++ b/drivers/media/i2c/as3645a.c @@ -713,7 +713,7 @@ static int as3645a_resume(struct device *dev) * The number of LEDs reported in platform data is used to compute default * limits. Parameters passed through platform data can override those limits. */ -static int __devinit as3645a_init_controls(struct as3645a *flash) +static int as3645a_init_controls(struct as3645a *flash) { const struct as3645a_platform_data *pdata = flash->pdata; struct v4l2_ctrl *ctrl; @@ -804,8 +804,8 @@ static int __devinit as3645a_init_controls(struct as3645a *flash) return flash->ctrls.error; } -static int __devinit as3645a_probe(struct i2c_client *client, - const struct i2c_device_id *devid) +static int as3645a_probe(struct i2c_client *client, + const struct i2c_device_id *devid) { struct as3645a *flash; int ret; @@ -846,7 +846,7 @@ done: return ret; } -static int __devexit as3645a_remove(struct i2c_client *client) +static int as3645a_remove(struct i2c_client *client) { struct v4l2_subdev *subdev = i2c_get_clientdata(client); struct as3645a *flash = to_as3645a(subdev); @@ -877,7 +877,7 @@ static struct i2c_driver as3645a_i2c_driver = { .pm = &as3645a_pm_ops, }, .probe = as3645a_probe, - .remove = __devexit_p(as3645a_remove), + .remove = as3645a_remove, .id_table = as3645a_id_table, }; diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index 8131d65..8a8d42f 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c @@ -926,8 +926,8 @@ static irqreturn_t m5mols_irq_handler(int irq, void *data) return IRQ_HANDLED; } -static int __devinit m5mols_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int m5mols_probe(struct i2c_client *client, + const struct i2c_device_id *id) { const struct m5mols_platform_data *pdata = client->dev.platform_data; struct m5mols_info *info; @@ -1018,7 +1018,7 @@ out_free: return ret; } -static int __devexit m5mols_remove(struct i2c_client *client) +static int m5mols_remove(struct i2c_client *client) { struct v4l2_subdev *sd = i2c_get_clientdata(client); struct m5mols_info *info = to_m5mols(sd); @@ -1045,7 +1045,7 @@ static struct i2c_driver m5mols_i2c_driver = { .name = MODULE_NAME, }, .probe = m5mols_probe, - .remove = __devexit_p(m5mols_remove), + .remove = m5mols_remove, .id_table = m5mols_id, }; diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c index f434a19..9ac1b8c3 100644 --- a/drivers/media/i2c/vs6624.c +++ b/drivers/media/i2c/vs6624.c @@ -788,7 +788,7 @@ static const struct v4l2_subdev_ops vs6624_ops = { .video = &vs6624_video_ops, }; -static int __devinit vs6624_probe(struct i2c_client *client, +static int vs6624_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct vs6624 *sensor; @@ -881,7 +881,7 @@ static int __devinit vs6624_probe(struct i2c_client *client, return ret; } -static int __devexit vs6624_remove(struct i2c_client *client) +static int vs6624_remove(struct i2c_client *client) { struct v4l2_subdev *sd = i2c_get_clientdata(client); struct vs6624 *sensor = to_vs6624(sd); @@ -906,7 +906,7 @@ static struct i2c_driver vs6624_driver = { .name = "vs6624", }, .probe = vs6624_probe, - .remove = __devexit_p(vs6624_remove), + .remove = vs6624_remove, .id_table = vs6624_id, }; -- cgit v1.1 From 12861dc659c7181e0b52facd97df70c6dd326106 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Wed, 5 Dec 2012 12:49:12 -0300 Subject: [media] m5mols: Fix typo in get_fmt callback The check of return value from __find_format() was inverted by mistake. This patch fixes regression introduced in commit 5565a2ad47 [media] m5mols: Protect driver data with a mutex Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/i2c') diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index 8131d65..b9b4485 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c @@ -556,7 +556,7 @@ static int m5mols_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, mutex_lock(&info->lock); format = __find_format(info, fh, fmt->which, info->res_type); - if (!format) + if (format) fmt->format = *format; else ret = -EINVAL; -- cgit v1.1