lkml.org 
[lkml]   [2005]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] exterminate strtok - drivers/video/au1100fb.c
Date
Since strtok() died in 2002 let's not use it - use strsep() instead which
is the replacement function.

Note: I've not been able to test this patch since I lack both hardware and
a cross compiler, so if someone else could please check it and sign off on
it before I send it to Andrew for inclusion in -mm I'd appreciate it.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

au1100fb.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

--- linux-2.6.13-rc6-mm2-orig/drivers/video/au1100fb.c 2005-08-17 21:51:59.000000000 +0200
+++ linux-2.6.13-rc6-mm2/drivers/video/au1100fb.c 2005-08-24 18:58:18.000000000 +0200
@@ -614,7 +614,7 @@ void au1100fb_cleanup(struct fb_info *in

void au1100fb_setup(char *options, int *ints)
{
- char* this_opt;
+ char *this_opt;
int i;
int num_panels = sizeof(panels)/sizeof(struct known_lcd_panels);

@@ -622,8 +622,9 @@ void au1100fb_setup(char *options, int *
if (!options || !*options)
return;

- for(this_opt=strtok(options, ","); this_opt;
- this_opt=strtok(NULL, ",")) {
+ while ((this_opt = strsep(&options, ","))) {
+ if (!*this_opt)
+ continue;
if (!strncmp(this_opt, "panel:", 6)) {
#if defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_DB1100)
/* Read Pb1100 Switch S10 ? */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-24 21:11    [W:0.038 / U:35.672 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site