mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
auxdisplay for v7.3-1
* Cancel backlight work on panel registration failure * Miscellaneous cleanups -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAmqL4y0ACgkQb7wzTHR8 rCh9oQ/+LJ/jsPyYb43AupK1iyOVCA9BO6Vjn/eb8bM+v4cyt9BN3NdoIgLe5bQM HdLBqQuuB2UD5Fo5QmGNitcmqU9XGucOMzrGK9nJlgdXHsMCeNtykbt0Jpunr5t8 1d0CQgCfsk2PF6YcPLuwZOK1jsHjyI5bmyhFENilO/+mxTFsZNj1s9s4auGDIqnH nhfmIWogCnL9CQQYsnHkZvj41DBY7ReM8Wt5T4gj4Bk5VHfcytOIouq5g/+j3r/D rAu/7oV5xPZmQBGovmD4ZHaxmF9bjpe32wsmhXKxEsQ+rvoKh71XAIvf/o+gvwBv V5DCJfLc3TvCLv/eoGNutNwXejX4EgoSfPBVDxj1+YhjuydGFmWRTvNwnELAGoKW /lhLCQ9+MzRHoDaIEcI3ae1Yzwpo95PnI6yKSCzhxaLAzJ9VgAMETnHIwHUOQ/fu 7YjknaCTIFt/2OlXlBXuZzyRmXSAbFSv0P3S/H2IWrY7BHJQlTmO+w1G98sqDQLQ lXiO1kd8mVRjOtCZIDFLqGig729DXvnmX3idbjkwGF7G2KApnW7Kl55QmvM9RqEi bHRLxhBrtAtj1Exu47hV9dR6Xy2lLYb7zFr9SpV7+b4MnCXygayB1S2SzxozFUG8 Br3rfwEavUDBnh5p3h+Q0itaoCaOvuj/j9O84TvIoSwp/QzhxfU= =GaAa -----END PGP SIGNATURE----- Merge tag 'auxdisplay-v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay Pull auxdisplay updates from Andy Shevchenko: - Cancel backlight work on panel registration failure - Miscellaneous cleanups * tag 'auxdisplay-v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay: auxdisplay: charlcd: cancel backlight work on registration failure auxdisplay: panel: Remove unused callback binding code auxdisplay: Remove redundant dev_err()
This commit is contained in:
commit
0b0e645ed2
|
|
@ -595,6 +595,16 @@ static int charlcd_init(struct charlcd *lcd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void charlcd_deinit(struct charlcd *lcd)
|
||||
{
|
||||
struct charlcd_priv *priv = charlcd_to_priv(lcd);
|
||||
|
||||
if (lcd->ops->backlight) {
|
||||
cancel_delayed_work_sync(&priv->bl_work);
|
||||
lcd->ops->backlight(lcd, CHARLCD_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
struct charlcd *charlcd_alloc(unsigned int drvdata_size)
|
||||
{
|
||||
struct charlcd_priv *priv;
|
||||
|
|
@ -654,8 +664,10 @@ int charlcd_register(struct charlcd *lcd)
|
|||
return ret;
|
||||
|
||||
ret = misc_register(&charlcd_dev);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
charlcd_deinit(lcd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
the_charlcd = lcd;
|
||||
register_reboot_notifier(&panel_notifier);
|
||||
|
|
@ -665,16 +677,11 @@ EXPORT_SYMBOL_GPL(charlcd_register);
|
|||
|
||||
int charlcd_unregister(struct charlcd *lcd)
|
||||
{
|
||||
struct charlcd_priv *priv = charlcd_to_priv(lcd);
|
||||
|
||||
unregister_reboot_notifier(&panel_notifier);
|
||||
charlcd_puts(lcd, "\x0cLCD driver unloaded.\x1b[Lc\x1b[Lb\x1b[L-");
|
||||
misc_deregister(&charlcd_dev);
|
||||
the_charlcd = NULL;
|
||||
if (lcd->ops->backlight) {
|
||||
cancel_delayed_work_sync(&priv->bl_work);
|
||||
priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF);
|
||||
}
|
||||
charlcd_deinit(lcd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -547,11 +547,8 @@ static int ht16k33_keypad_probe(struct i2c_client *client,
|
|||
ht16k33_keypad_irq_thread,
|
||||
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
|
||||
DRIVER_NAME, keypad);
|
||||
if (err) {
|
||||
dev_err(dev, "irq request failed %d, error %d\n", client->irq,
|
||||
err);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
ht16k33_keypad_stop(keypad->dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -1450,43 +1450,6 @@ static struct logical_input *panel_bind_key(const char *name, const char *press,
|
|||
return key;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* tries to bind a callback function to the signal name <name>. The function
|
||||
* <press_fct> will be called with the <press_data> arg when the signal is
|
||||
* activated, and so on for <release_fct>/<release_data>
|
||||
* Returns the pointer to the new signal if ok, NULL if the signal could not
|
||||
* be bound.
|
||||
*/
|
||||
static struct logical_input *panel_bind_callback(char *name,
|
||||
void (*press_fct)(int),
|
||||
int press_data,
|
||||
void (*release_fct)(int),
|
||||
int release_data)
|
||||
{
|
||||
struct logical_input *callback;
|
||||
|
||||
callback = kmalloc(sizeof(*callback), GFP_KERNEL);
|
||||
if (!callback)
|
||||
return NULL;
|
||||
|
||||
memset(callback, 0, sizeof(struct logical_input));
|
||||
if (!input_name2mask(name, &callback->mask, &callback->value,
|
||||
&scan_mask_i, &scan_mask_o))
|
||||
return NULL;
|
||||
|
||||
callback->type = INPUT_TYPE_STD;
|
||||
callback->state = INPUT_ST_LOW;
|
||||
callback->rise_time = 1;
|
||||
callback->fall_time = 1;
|
||||
callback->u.std.press_fct = press_fct;
|
||||
callback->u.std.press_data = press_data;
|
||||
callback->u.std.release_fct = release_fct;
|
||||
callback->u.std.release_data = release_data;
|
||||
list_add(&callback->list, &logical_inputs);
|
||||
return callback;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void keypad_init(void)
|
||||
{
|
||||
int keynum;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user