diff options
author | Pavan Savoy | 2010-07-28 09:25:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-07-28 17:20:56 +0200 |
commit | c1afac1502c4e519e6a1df08a5d9a2391d00388b (patch) | |
tree | 4b15d72dc5253bda9a34641fa48198537b3d5b28 /drivers/staging/ti-st/st_core.c | |
parent | Staging: line6: needs to select SND_PCM (diff) | |
download | kernel-qcow2-linux-c1afac1502c4e519e6a1df08a5d9a2391d00388b.tar.gz kernel-qcow2-linux-c1afac1502c4e519e6a1df08a5d9a2391d00388b.tar.xz kernel-qcow2-linux-c1afac1502c4e519e6a1df08a5d9a2391d00388b.zip |
Staging: ti-st: mv sysfs entries to debugfs
When the chip is in use, information like the chip's ROM version and the
protocols currently making use of the chip needs to be made known to
user-space.
Earlier the version and the protocol-list were exposed as sysfs entries
now cleanup by making them as debugfs entries, also in process remove
any unwanted/previously unused sysfs entries.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ti-st/st_core.c')
-rw-r--r-- | drivers/staging/ti-st/st_core.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/staging/ti-st/st_core.c b/drivers/staging/ti-st/st_core.c index fc6de63fc238..063c9b1db1ab 100644 --- a/drivers/staging/ti-st/st_core.c +++ b/drivers/staging/ti-st/st_core.c @@ -39,7 +39,6 @@ #include "st.h" #define VERBOSE -#ifdef DEBUG /* strings to be used for rfkill entries and by * ST Core to be used for sysfs debug entry */ @@ -49,7 +48,6 @@ const unsigned char *protocol_strngs[] = { PROTO_ENTRY(ST_FM, "FM"), PROTO_ENTRY(ST_GPS, "GPS"), }; -#endif /* function pointer pointing to either, * st_kim_recv during registration to receive fw download responses * st_int_recv after registration to receive proto stack responses @@ -563,34 +561,13 @@ void st_tx_wakeup(struct st_data_s *st_data) /********************************************************************/ /* functions called from ST KIM */ -void kim_st_list_protocols(struct st_data_s *st_gdata, char *buf) +void kim_st_list_protocols(struct st_data_s *st_gdata, void *buf) { - unsigned long flags = 0; -#ifdef DEBUG - unsigned char i = ST_MAX; -#endif - spin_lock_irqsave(&st_gdata->lock, flags); -#ifdef DEBUG /* more detailed log */ - for (i = 0; i < ST_MAX; i++) { - if (i == 0) { - sprintf(buf, "%s is %s", protocol_strngs[i], - st_gdata->list[i] != - NULL ? "Registered" : "Unregistered"); - } else { - sprintf(buf, "%s\n%s is %s", buf, protocol_strngs[i], - st_gdata->list[i] != - NULL ? "Registered" : "Unregistered"); - } - } - sprintf(buf, "%s\n", buf); -#else /* limited info */ - sprintf(buf, "[%d]\nBT=%c\nFM=%c\nGPS=%c\n", + seq_printf(buf, "[%d]\nBT=%c\nFM=%c\nGPS=%c\n", st_gdata->protos_registered, st_gdata->list[ST_BT] != NULL ? 'R' : 'U', st_gdata->list[ST_FM] != NULL ? 'R' : 'U', st_gdata->list[ST_GPS] != NULL ? 'R' : 'U'); -#endif - spin_unlock_irqrestore(&st_gdata->lock, flags); } /********************************************************************/ |