Message ID | 20200324170532.44384-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v1,1/5] video: ssd1307fb: Convert driver to use ->probe_new() | expand |
On Tue, Mar 24, 2020 at 07:05:28PM +0200, Andy Shevchenko wrote: > Use the ->probe_new() callback. > > The driver does not use const struct i2c_device_id * argument, > so convert it to utilise the simplified I²C driver registration. > Bartlomiej, any comments on the series? > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/video/fbdev/ssd1307fb.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c > index 142535267fec..397eae246c2c 100644 > --- a/drivers/video/fbdev/ssd1307fb.c > +++ b/drivers/video/fbdev/ssd1307fb.c > @@ -586,8 +586,7 @@ static const struct of_device_id ssd1307fb_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); > > -static int ssd1307fb_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int ssd1307fb_probe(struct i2c_client *client) > { > struct backlight_device *bl; > char bl_name[12]; > @@ -599,11 +598,6 @@ static int ssd1307fb_probe(struct i2c_client *client, > void *vmem; > int ret; > > - if (!node) { > - dev_err(&client->dev, "No device tree data found!\n"); > - return -EINVAL; > - } > - > info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev); > if (!info) > return -ENOMEM; > @@ -808,7 +802,7 @@ static const struct i2c_device_id ssd1307fb_i2c_id[] = { > MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); > > static struct i2c_driver ssd1307fb_driver = { > - .probe = ssd1307fb_probe, > + .probe_new = ssd1307fb_probe, > .remove = ssd1307fb_remove, > .id_table = ssd1307fb_i2c_id, > .driver = { > -- > 2.25.1 >
On Mon, Mar 30, 2020 at 12:51:44PM +0300, Andy Shevchenko wrote: > On Tue, Mar 24, 2020 at 07:05:28PM +0200, Andy Shevchenko wrote: > > Use the ->probe_new() callback. > > > > The driver does not use const struct i2c_device_id * argument, > > so convert it to utilise the simplified I²C driver registration. > > > > Bartlomiej, any comments on the series? Do I need to do something with the series? > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > --- > > drivers/video/fbdev/ssd1307fb.c | 10 ++-------- > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c > > index 142535267fec..397eae246c2c 100644 > > --- a/drivers/video/fbdev/ssd1307fb.c > > +++ b/drivers/video/fbdev/ssd1307fb.c > > @@ -586,8 +586,7 @@ static const struct of_device_id ssd1307fb_of_match[] = { > > }; > > MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); > > > > -static int ssd1307fb_probe(struct i2c_client *client, > > - const struct i2c_device_id *id) > > +static int ssd1307fb_probe(struct i2c_client *client) > > { > > struct backlight_device *bl; > > char bl_name[12]; > > @@ -599,11 +598,6 @@ static int ssd1307fb_probe(struct i2c_client *client, > > void *vmem; > > int ret; > > > > - if (!node) { > > - dev_err(&client->dev, "No device tree data found!\n"); > > - return -EINVAL; > > - } > > - > > info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev); > > if (!info) > > return -ENOMEM; > > @@ -808,7 +802,7 @@ static const struct i2c_device_id ssd1307fb_i2c_id[] = { > > MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); > > > > static struct i2c_driver ssd1307fb_driver = { > > - .probe = ssd1307fb_probe, > > + .probe_new = ssd1307fb_probe, > > .remove = ssd1307fb_remove, > > .id_table = ssd1307fb_i2c_id, > > .driver = { > > -- > > 2.25.1 > > > > -- > With Best Regards, > Andy Shevchenko > >
[ added dri-devel to Cc: ] Hi, On 4/15/20 4:20 PM, Andy Shevchenko wrote: > On Mon, Mar 30, 2020 at 12:51:44PM +0300, Andy Shevchenko wrote: >> On Tue, Mar 24, 2020 at 07:05:28PM +0200, Andy Shevchenko wrote: >>> Use the ->probe_new() callback. >>> >>> The driver does not use const struct i2c_device_id * argument, >>> so convert it to utilise the simplified I²C driver registration. >>> >> >> Bartlomiej, any comments on the series? > > Do I need to do something with the series? It hasn't been lost :), just handling of fbdev patches posted too late for v5.7 has been postponed after v5.7-rc1 release. LGTM after quick look. I'll review it properly / apply later this week (hopefully tomorrow). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics >>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >>> --- >>> drivers/video/fbdev/ssd1307fb.c | 10 ++-------- >>> 1 file changed, 2 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c >>> index 142535267fec..397eae246c2c 100644 >>> --- a/drivers/video/fbdev/ssd1307fb.c >>> +++ b/drivers/video/fbdev/ssd1307fb.c >>> @@ -586,8 +586,7 @@ static const struct of_device_id ssd1307fb_of_match[] = { >>> }; >>> MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); >>> >>> -static int ssd1307fb_probe(struct i2c_client *client, >>> - const struct i2c_device_id *id) >>> +static int ssd1307fb_probe(struct i2c_client *client) >>> { >>> struct backlight_device *bl; >>> char bl_name[12]; >>> @@ -599,11 +598,6 @@ static int ssd1307fb_probe(struct i2c_client *client, >>> void *vmem; >>> int ret; >>> >>> - if (!node) { >>> - dev_err(&client->dev, "No device tree data found!\n"); >>> - return -EINVAL; >>> - } >>> - >>> info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev); >>> if (!info) >>> return -ENOMEM; >>> @@ -808,7 +802,7 @@ static const struct i2c_device_id ssd1307fb_i2c_id[] = { >>> MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); >>> >>> static struct i2c_driver ssd1307fb_driver = { >>> - .probe = ssd1307fb_probe, >>> + .probe_new = ssd1307fb_probe, >>> .remove = ssd1307fb_remove, >>> .id_table = ssd1307fb_i2c_id, >>> .driver = { >>> -- >>> 2.25.1 >>> >> >> -- >> With Best Regards, >> Andy Shevchenko
[ added dri-devel ML to Cc: ] On 3/24/20 6:05 PM, Andy Shevchenko wrote: > Use the ->probe_new() callback. > > The driver does not use const struct i2c_device_id * argument, > so convert it to utilise the simplified I²C driver registration. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Patch queued for v5.8, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/video/fbdev/ssd1307fb.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c > index 142535267fec..397eae246c2c 100644 > --- a/drivers/video/fbdev/ssd1307fb.c > +++ b/drivers/video/fbdev/ssd1307fb.c > @@ -586,8 +586,7 @@ static const struct of_device_id ssd1307fb_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); > > -static int ssd1307fb_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int ssd1307fb_probe(struct i2c_client *client) > { > struct backlight_device *bl; > char bl_name[12]; > @@ -599,11 +598,6 @@ static int ssd1307fb_probe(struct i2c_client *client, > void *vmem; > int ret; > > - if (!node) { > - dev_err(&client->dev, "No device tree data found!\n"); > - return -EINVAL; > - } > - > info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev); > if (!info) > return -ENOMEM; > @@ -808,7 +802,7 @@ static const struct i2c_device_id ssd1307fb_i2c_id[] = { > MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); > > static struct i2c_driver ssd1307fb_driver = { > - .probe = ssd1307fb_probe, > + .probe_new = ssd1307fb_probe, > .remove = ssd1307fb_remove, > .id_table = ssd1307fb_i2c_id, > .driver = { >
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 142535267fec..397eae246c2c 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -586,8 +586,7 @@ static const struct of_device_id ssd1307fb_of_match[] = { }; MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); -static int ssd1307fb_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ssd1307fb_probe(struct i2c_client *client) { struct backlight_device *bl; char bl_name[12]; @@ -599,11 +598,6 @@ static int ssd1307fb_probe(struct i2c_client *client, void *vmem; int ret; - if (!node) { - dev_err(&client->dev, "No device tree data found!\n"); - return -EINVAL; - } - info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev); if (!info) return -ENOMEM; @@ -808,7 +802,7 @@ static const struct i2c_device_id ssd1307fb_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id); static struct i2c_driver ssd1307fb_driver = { - .probe = ssd1307fb_probe, + .probe_new = ssd1307fb_probe, .remove = ssd1307fb_remove, .id_table = ssd1307fb_i2c_id, .driver = {
Use the ->probe_new() callback. The driver does not use const struct i2c_device_id * argument, so convert it to utilise the simplified I²C driver registration. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/video/fbdev/ssd1307fb.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)