fbdev fixes for v4.11-rc6:

- fix probing time checks in omapfb driver (regression fix)
 - fix optional VBAT support in ssd1307fb driver (regression fix)
 - fix connecting to backend in xen-fbfront driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJY8LdxAAoJEH4ztj+gR8ILHkMP/j3ThWNPtSnIQpzSDpASEdl6
 u99PTeTpCWPWsDkl/c9OIZGFVfDXbMwUVeUMDRX/3tieMsy/Lhx53p4NLn3JnBAC
 UNyHAE9/3vLHohMeTHp+TOMW7oHM3+hFfpzI50IW89UpimfAD2VTHBHxptMDESbt
 5XhRqWUEbgRuN+WOEvMGICzRIxuFflMIm9KXTHemsU2cnaK6TOpO7bCUQoIfo6Vs
 0bNxY+064xAFbv+2Rx7yBI955fqNBhvlpq6KzHenPB4U0kDu5DzJ5+p8zk5tpGkW
 hm6K06PtO4XegBeHbRCR/gzAvldBFMdLOG3XgKbMLdPqzr+JHiNALoLb/Ywt55MZ
 C60V7abJTWqGreXzZhIJJLYxf/NLjfOeABNWa4O97+dE+DPElN4PlqGsoAEqxWkf
 Fq3MASwe1B3TuCs88G4GaJBdl10Q2jRl3zuFqf/S5BkqDCzz999bTcORL4wTYYWs
 g6zURDeGOdbAFizcMwTNn1bst0nuwoTEqEVsqvO4i7nxi5iqdDV40Tq5I2YWLIPF
 bykm2amViUdnBC9TXnSLLCS9IJiyG2HgkVEKbqAa0Uq3kC8K4wkf5rg/K94MUUl3
 k0COZhV54KLoRJte54vfmCxNEJG/pUQ8OTOEUC1VaWInmPJeRHoAK4dbQgdPYYxe
 EeWPffl2JBojM02N7wwp
 =nRWS
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-v4.11-rc6' of git://github.com/bzolnier/linux

Pull fbdev fixes from Bartlomiej Zolnierkiewicz:

 - fix probing time checks in omapfb driver (regression fix)

 - fix optional VBAT support in ssd1307fb driver (regression fix)

 - fix connecting to backend in xen-fbfront driver

* tag 'fbdev-v4.11-rc6' of git://github.com/bzolnier/linux:
  fbdev: omapfb: delete check_required_callbacks()
  xen, fbfront: fix connecting to backend
  fbdev/ssd1307fb: fix optional VBAT support
This commit is contained in:
Linus Torvalds 2017-04-14 09:18:17 -07:00
commit 82f1faa867
3 changed files with 18 additions and 25 deletions

View File

@ -1608,19 +1608,6 @@ static int omapfb_find_ctrl(struct omapfb_device *fbdev)
return 0;
}
static void check_required_callbacks(struct omapfb_device *fbdev)
{
#define _C(x) (fbdev->ctrl->x != NULL)
#define _P(x) (fbdev->panel->x != NULL)
BUG_ON(fbdev->ctrl == NULL || fbdev->panel == NULL);
BUG_ON(!(_C(init) && _C(cleanup) && _C(get_caps) &&
_C(set_update_mode) && _C(setup_plane) && _C(enable_plane) &&
_P(init) && _P(cleanup) && _P(enable) && _P(disable) &&
_P(get_caps)));
#undef _P
#undef _C
}
/*
* Called by LDM binding to probe and attach a new device.
* Initialization sequence:
@ -1705,8 +1692,6 @@ static int omapfb_do_probe(struct platform_device *pdev,
omapfb_ops.fb_mmap = omapfb_mmap;
init_state++;
check_required_callbacks(fbdev);
r = planes_init(fbdev);
if (r)
goto cleanup;

View File

@ -578,10 +578,14 @@ static int ssd1307fb_probe(struct i2c_client *client,
par->vbat_reg = devm_regulator_get_optional(&client->dev, "vbat");
if (IS_ERR(par->vbat_reg)) {
dev_err(&client->dev, "failed to get VBAT regulator: %ld\n",
PTR_ERR(par->vbat_reg));
ret = PTR_ERR(par->vbat_reg);
goto fb_alloc_error;
if (ret == -ENODEV) {
par->vbat_reg = NULL;
} else {
dev_err(&client->dev, "failed to get VBAT regulator: %d\n",
ret);
goto fb_alloc_error;
}
}
if (of_property_read_u32(node, "solomon,width", &par->width))
@ -668,10 +672,13 @@ static int ssd1307fb_probe(struct i2c_client *client,
udelay(4);
}
ret = regulator_enable(par->vbat_reg);
if (ret) {
dev_err(&client->dev, "failed to enable VBAT: %d\n", ret);
goto reset_oled_error;
if (par->vbat_reg) {
ret = regulator_enable(par->vbat_reg);
if (ret) {
dev_err(&client->dev, "failed to enable VBAT: %d\n",
ret);
goto reset_oled_error;
}
}
ret = ssd1307fb_init(par);
@ -710,7 +717,8 @@ panel_init_error:
pwm_put(par->pwm);
};
regulator_enable_error:
regulator_disable(par->vbat_reg);
if (par->vbat_reg)
regulator_disable(par->vbat_reg);
reset_oled_error:
fb_deferred_io_cleanup(info);
fb_alloc_error:

View File

@ -643,7 +643,6 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
break;
case XenbusStateInitWait:
InitWait:
xenbus_switch_state(dev, XenbusStateConnected);
break;
@ -654,7 +653,8 @@ InitWait:
* get Connected twice here.
*/
if (dev->state != XenbusStateConnected)
goto InitWait; /* no InitWait seen yet, fudge it */
/* no InitWait seen yet, fudge it */
xenbus_switch_state(dev, XenbusStateConnected);
if (xenbus_read_unsigned(info->xbdev->otherend,
"request-update", 0))