add exfat fs based on Samsung's GPLv2 exfat driver

Samsung released this driver for the exFAT (and FAT12/16/32) filesystem
under the GPLv2, it is based on a fork of the in-kernel FAT driver.

This driver is based on version 1.2.4 of Samsungs OpenSource driver with
fixes for later Kernel releases.

original authors: Joosun Hahn
		Sung-Kwan Kim

Signed-off-by: Liu Qishuai <lqs@lqs.me>
Signed-off-by: rxrz <rxrz@hush.ai>
Signed-off-by: Dorimanx <yuri@bynet.co.il>
Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
merge the two modules into one

The exfat driver was split into two modules, exfat_core.ko and exfat_fs.ko.
Since such seperation is not neccessary, make the driver availiable as one
module. The module will be called exfat.

Signed-off-by: Liu Qishuai <lqs@lqs.me>
Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
get rid of STRLEN

The driver uses it's own STRLEN define which is just a wrapper for strlen().
In some cases, calling strlen is not necessary to begin with, so remove those calls.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
use standard kernel functions and units where possible

exfat_global.h defines it's own data types and useless wrappers around kernel functions.
Replace the custom data types with kernle standard and get rid of unneccessary defines.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
get rid of MALLOC

exfat_global.h defines a custom MALLOC() function which is just a wrapper around kmalloc().
This patch replaces MALLOC with kmalloc.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
get rid of FREE

exfat_global.h defines a custom FREE() function, a wrapper around kfree() that also
always checks wheather the pointer to free is not NULL.
However, this is not very obvious, so get rid of this construct.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
get rid of PRINT

exfat_global.h defines a PRINT alias for printk.
It has no use, so remove it.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
remove my_itoa

exfat_global.c defines a function to convert integers to ascii text.
This function is only used once an can easiely be replaced by snprintf, so remove it.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
get rid of WSTRCHR

The 'wide' (16bit characters) version of strchr is only used once, so there is no need
for it to be a global function. Move it from exfat_global.c to exfat_nls.c.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
fix coding style, especially get rid of all the return(x) 'calls'

The driver exhibits a strange coding style where arguments to return are put into parenthesis
as if they were function calls. This pach removes the superflous brackets.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
PRINTK -> DPRINTK

To keep consistency with other kernel modules and to avoid confusion,
name the Debug printk DPRINTK instead of just PRINTK.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
move exfat_global to exfat_bitmap move DPRINTK to exfat_core.h

After removing unused and unneccesary defines, exfat_global only has 3 functions left.
They all deal with bitmap manipulation, so move them to exfat_bitmap.
These functions are only used in exfat_core.c, but the file is large enough already,
so keep them in a seperate file.
The DPRINTK macro now moves to exfat_core.h

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
add Kconfig option for THERE_IS_MBR, DELAYED_SYNC and ELAPSED_TIME

This exposes the three compile time options THERE_IS_MBR, DELAYED_SYNC and ELAPSED_TIME
to Kconfig. There is however no documentation on what these options do.

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>