@@ -1592,6 +1592,39 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv, bool send_
1592
1592
priv -> r_touchpad_val = value ;
1593
1593
}
1594
1594
1595
+ static int ideapad_laptop_nb_notify (struct notifier_block * nb ,
1596
+ unsigned long action , void * data )
1597
+ {
1598
+ switch (action ) {
1599
+ }
1600
+
1601
+ return 0 ;
1602
+ }
1603
+
1604
+ static struct notifier_block ideapad_laptop_notifier = {
1605
+ .notifier_call = ideapad_laptop_nb_notify ,
1606
+ };
1607
+
1608
+ static BLOCKING_NOTIFIER_HEAD (ideapad_laptop_chain_head );
1609
+
1610
+ int ideapad_laptop_register_notifier (struct notifier_block * nb )
1611
+ {
1612
+ return blocking_notifier_chain_register (& ideapad_laptop_chain_head , nb );
1613
+ }
1614
+ EXPORT_SYMBOL_NS_GPL (ideapad_laptop_register_notifier , IDEAPAD_LAPTOP );
1615
+
1616
+ int ideapad_laptop_unregister_notifier (struct notifier_block * nb )
1617
+ {
1618
+ return blocking_notifier_chain_unregister (& ideapad_laptop_chain_head , nb );
1619
+ }
1620
+ EXPORT_SYMBOL_NS_GPL (ideapad_laptop_unregister_notifier , IDEAPAD_LAPTOP );
1621
+
1622
+ void ideapad_laptop_call_notifier (unsigned long action , void * data )
1623
+ {
1624
+ blocking_notifier_call_chain (& ideapad_laptop_chain_head , action , data );
1625
+ }
1626
+ EXPORT_SYMBOL_NS_GPL (ideapad_laptop_call_notifier , IDEAPAD_LAPTOP );
1627
+
1595
1628
static void ideapad_acpi_notify (acpi_handle handle , u32 event , void * data )
1596
1629
{
1597
1630
struct ideapad_private * priv = data ;
@@ -1974,6 +2007,8 @@ static int ideapad_acpi_add(struct platform_device *pdev)
1974
2007
if (err )
1975
2008
goto shared_init_failed ;
1976
2009
2010
+ ideapad_laptop_register_notifier (& ideapad_laptop_notifier );
2011
+
1977
2012
return 0 ;
1978
2013
1979
2014
shared_init_failed :
@@ -2006,6 +2041,8 @@ static void ideapad_acpi_remove(struct platform_device *pdev)
2006
2041
struct ideapad_private * priv = dev_get_drvdata (& pdev -> dev );
2007
2042
int i ;
2008
2043
2044
+ ideapad_laptop_unregister_notifier (& ideapad_laptop_notifier );
2045
+
2009
2046
ideapad_shared_exit (priv );
2010
2047
2011
2048
acpi_remove_notify_handler (priv -> adev -> handle ,
0 commit comments