--- a/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig @@ -119,4 +119,11 @@ config LEDS_TRIGGER_NETDEV This allows LEDs to be controlled by network device activity. If unsure, say Y. +config LEDS_TRIGGER_USBDEV + tristate "LED USB device Trigger" + depends on USB && LEDS_TRIGGERS + help + This allows LEDs to be controlled by the presence/activity of + an USB device. If unsure, say N. + endif # LEDS_TRIGGERS --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -67,3 +67,4 @@ obj-$(CONFIG_LEDS_DAC124S085) += leds-d obj-$(CONFIG_LEDS_TRIGGERS) += trigger/ obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o obj-$(CONFIG_LEDS_TRIGGER_NETDEV) += ledtrig-netdev.o +obj-$(CONFIG_LEDS_TRIGGER_USBDEV) += ledtrig-usbdev.o --- a/drivers/leds/ledtrig-usbdev.c +++ b/drivers/leds/ledtrig-usbdev.c @@ -24,7 +24,6 @@ #include <linux/list.h> #include <linux/spinlock.h> #include <linux/device.h> -#include <linux/sysdev.h> #include <linux/timer.h> #include <linux/ctype.h> #include <linux/slab.h> ed='selected'>chaos_calmer</option> <option value='lede-17.01'>lede-17.01</option> <option value='less-old-master'>less-old-master</option> <option value='master'>master</option> <option value='old-master'>old-master</option> <option value='openwrt-18.06'>openwrt-18.06</option> <option value='openwrt-19.07'>openwrt-19.07</option> <option value='upstream'>upstream</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>upstream openwrt</td><td class='sub right'>James</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/openwrt/upstream/about/?h=chaos_calmer'>about</a><a href='/cgit.cgi/openwrt/upstream/?h=chaos_calmer'>summary</a><a href='/cgit.cgi/openwrt/upstream/refs/?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>refs</a><a href='/cgit.cgi/openwrt/upstream/log/README?h=chaos_calmer'>log</a><a class='active' href='/cgit.cgi/openwrt/upstream/tree/README?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>tree</a><a href='/cgit.cgi/openwrt/upstream/commit/README?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>commit</a><a href='/cgit.cgi/openwrt/upstream/diff/README?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>diff</a><a href='/cgit.cgi/openwrt/upstream/stats/README?h=chaos_calmer'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/openwrt/upstream/log/README'> <input type='hidden' name='h' value='chaos_calmer'/><input type='hidden' name='id' value='e6052213256e84f49049708e9ec639950283819e'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/openwrt/upstream/tree/?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>root</a>/<a href='/cgit.cgi/openwrt/upstream/tree/README?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>README</a></div><div class='content'>blob: 4cbe56343cfa8ef21a50370ee94a3326cd283c69 (<a href='/cgit.cgi/openwrt/upstream/plain/README?h=chaos_calmer&id=e6052213256e84f49049708e9ec639950283819e'>plain</a>) <table summary='blob content' class='blob'> <tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a> <a id='n2' href='#n2'>2</a> <a id='n3' href='#n3'>3</a> <a id='n4' href='#n4'>4</a> <a id='n5' href='#n5'>5</a> <a id='n6' href='#n6'>6</a> <a id='n7' href='#n7'>7</a> <a id='n8' href='#n8'>8</a> <a id='n9' href='#n9'>9</a> <a id='n10' href='#n10'>10</a> <a id='n11' href='#n11'>11</a> <a id='n12' href='#n12'>12</a> <a id='n13' href='#n13'>13</a> <a id='n14' href='#n14'>14</a> <a id='n15' href='#n15'>15</a> <a id='n16' href='#n16'>16</a> <a id='n17' href='#n17'>17</a> <a id='n18' href='#n18'>18</a> <a id='n19' href='#n19'>19</a> <a id='n20' href='#n20'>20</a> <a id='n21' href='#n21'>21</a> <a id='n22' href='#n22'>22</a> <a id='n23' href='#n23'>23</a> <a id='n24' href='#n24'>24</a> <a id='n25' href='#n25'>25</a> <a id='n26' href='#n26'>26</a> <a id='n27' href='#n27'>27</a> <a id='n28' href='#n28'>28</a> <a id='n29' href='#n29'>29</a> <a id='n30' href='#n30'>30</a> <a id='n31' href='#n31'>31</a> <a id='n32' href='#n32'>32</a> <a id='n33' href='#n33'>33</a> <a id='n34' href='#n34'>34</a> <a id='n35' href='#n35'>35</a> </pre></td> <td class='lines'><pre><code>