History log of /linux-master/drivers/staging/rts5208/rtsx_card.c
Revision Date Author Comments
# a815e131 21-Sep-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: rts5208: remove unnecessary parentheses in rtsx_card.c

This commit removes unnecessary parentheses that have been flagged
by checkpatch.pl in rtsx_card.c.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/41db2310fdd942a8d840e21572f1fe21879798e2.1632209460.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bb1e6779 22-Oct-2018 Kim Bradley <kim.jamie.bradley@gmail.com>

Staging: rts5208: Add SPDX license tags

Add SPDX license tags to remove checkpatch SPDX warnings.

Signed-off-by: Kim Bradley <kim.jamie.bradley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9f902b49 20-Sep-2018 Aymen Qader <qader.aymen@gmail.com>

staging: rts5208: Remove unnecessary braces {}

This patch fixes the checkpatch.pl warning "braces {} are not necessary"
in the rts5208 driver. Mostly applies to single-line return/goto if
blocks.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c238d7b1 18-Jun-2018 Arnd Bergmann <arnd@arndb.de>

staging: rtsx: remove rtsx_trace() and related code

The driver has rather excessive amount of tracing code, which would be
better done using ftrace. This is obviously not a main feature of the
driver, and it should work just as well without it.

Removing it saves over 1300 lines of code and likely makes the driver
a bit faster by avoiding lots of calls into the timekeeping code.

I came across this while cleaning up the last users of the deprecated
getnstimeofday64() function, of which there is one in the now-removed
get_current_time() function of the rtsx driver that was only used for
tracing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a38e369b 11-Oct-2016 Wayne Porter <wporter82@gmail.com>

staging: rts5208: Comparison to NULL

Fix to resolve checkpatch message

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 911e84a0 11-Oct-2016 Wayne Porter <wporter82@gmail.com>

staging: rts5208: Spacing

Adding space around operator for better readability and to stop
checkpatch check messages

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 117b6038 11-Oct-2016 Wayne Porter <wporter82@gmail.com>

staging: rts5208: Unnecessary parentheses

Remove parentheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e379c79b 11-Oct-2016 Wayne Porter <wporter82@gmail.com>

staging: rts5208: Parenthesis alignment

Fix alignment to stop checkpath check messages

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e29cebe9 18-Sep-2016 Cathal Mullaney <chuckleberryfinn@gmail.com>

Staging: rts5208: rtsx_card.c: Fixed brace style issues

Fixed several minor brace coding style issues.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 132aba09 15-Sep-2016 Sergio Paracuellos <sergio.paracuellos@gmail.com>

staging: rts5208: make some vars to lower case to keep the style consistent

This patch fixes the checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d5b7d2b0 30-Jul-2016 Jonas Rickert <jrickertkc@gmail.com>

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>


# 143b3bf6 25-Mar-2016 Bhumika Goyal <bhumirks@gmail.com>

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>


# 8ee775f9 25-Mar-2015 Joe Perches <joe@perches.com>

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>


# 031366ea 25-Mar-2015 Joe Perches <joe@perches.com>

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>


# bf6c0d11 29-Jul-2014 Fabio Falzoi <fabio.falzoi84@gmail.com>

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>


# 8470e791 12-Mar-2014 Gulsah Kose <gulsah.1004@gmail.com>

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>


# 0dedbf9f 12-Mar-2014 Gulsah Kose <gulsah.1004@gmail.com>

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>


# fa590c22 12-Nov-2013 Micky Ching <micky_ching@realsil.com.cn>

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>