Commit graph

8 commits

Author SHA1 Message Date
Jonas Rickert d5b7d2b02c Staging: rts5208: fix double blank line coding style issues
This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl

Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Bhumika Goyal 143b3bf6d3 Staging: rts5208: rtsx_card.c: Remove unused function
The functions double_depth, check_card_fail, check_card_ejected are not
used anywhere in the kernel. So, remove their prototype and definition.
Grepped to find occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:45:23 -07:00
Joe Perches 8ee775f92c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros
Macros with hidden flow control are bad form as the code path
taken can be unexpected for the reader.

Expand these in-place and remove the macros.

Done with coccinelle script:

@@
expression chip;
expression arg1;
expression arg2;
expression arg3;
@@

-	RTSX_WRITE_REG(chip, arg1, arg2, arg3);
+	retval = rtsx_write_register(chip, arg1, arg2, arg3);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

@@
expression chip;
expression arg1;
expression arg2;
@@

-	RTSX_READ_REG(chip, arg1, arg2);
+	retval = rtsx_read_register(chip, arg1, arg2);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:17:05 +01:00
Joe Perches 031366ea65 staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros
Remove these flow hiding macros.

Miscellanea:

o Add a macro and function to replace a large inline
o Simplify #includes
o Add trace.c and update Makefile
o Remove static inline filename function and use kbasename instead

This reduces object size quite a lot: ~350KB (x86-64 allyesconfig)

$ size drivers/staging/rts5208/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 248385	  36728	  77888	 363001	  589f9	drivers/staging/rts5208/built-in.o.new
 506691	  83352	 115896	 705939	  ac593	drivers/staging/rts5208/built-in.o.old

Done via coccinelle script and some typing.

@@
expression chip;
expression ret;
@@

-	TRACE_RET(chip, ret);
+	rtsx_trace(chip);
+	return ret;

@@
expression chip;
identifier label;
@@

-	TRACE_GOTO(chip, label);
+	rtsx_trace(chip);
+	goto label;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:16:19 +01:00
Fabio Falzoi bf6c0d110e Staging: rts5208: Replace custom macro with dev_dbg
Use dev_dbg macro to control tracing verbosity through dynamic debug facility.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:22:18 -07:00
Gulsah Kose 8470e79188 staging: rts5208: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in rtsx_card.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:56:51 -07:00
Gulsah Kose 0dedbf9f56 staging: rts5208: Remove unnecessary parentheses.
Return is not a method and doesn't need parentheses. Removed unnecaasary
parentheses.

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:01 -07:00
Micky Ching fa590c222f staging: rts5208: add support for rts5208 and rts5288
There are still many rts5208/5288 card readers being used, but no
drivers are supported them in kernel now. This driver can make a
great convenience for people who use them.

Many other rts-series card reader are supported by mfd driver, but due
to much difference with others, rts5208/5288 can not add into mfd driver
pretty now, so we provide a separated driver here to support the device.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:44:37 -08:00