These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / fbtft / fb_hx8347d.c
index 03ae95b..6ff76e5 100644 (file)
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include <linux/module.h>
 #define DEFAULT_GAMMA  "0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" \
                        "0 0 0 0 0 0 0 0 0 0 0 0 0 0"
 
-
 static int init_display(struct fbtft_par *par)
 {
-       fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
-
        par->fbtftops.reset(par);
 
        /* driving ability */
@@ -92,9 +85,6 @@ static int init_display(struct fbtft_par *par)
 
 static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
 {
-       fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
-               "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
-
        write_reg(par, 0x02, (xs >> 8) & 0xFF);
        write_reg(par, 0x03, xs & 0xFF);
        write_reg(par, 0x04, (xe >> 8) & 0xFF);
@@ -111,7 +101,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
     VRP0 VRP1 VRP2 VRP3 VRP4 VRP5 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 CGM
     VRN0 VRN1 VRN2 VRN3 VRN4 VRN5 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 CGM
 */
-#define CURVE(num, idx)  curves[num*par->gamma.num_values + idx]
+#define CURVE(num, idx)  curves[num * par->gamma.num_values + idx]
 static int set_gamma(struct fbtft_par *par, unsigned long *curves)
 {
        unsigned long mask[] = {
@@ -121,8 +111,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
        int i, j;
        int acc = 0;
 
-       fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
-
        /* apply mask */
        for (i = 0; i < par->gamma.num_curves; i++)
                for (j = 0; j < par->gamma.num_values; j++) {
@@ -154,7 +142,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
 }
 #undef CURVE
 
-
 static struct fbtft_display display = {
        .regwidth = 8,
        .width = WIDTH,
@@ -168,6 +155,7 @@ static struct fbtft_display display = {
                .set_gamma = set_gamma,
        },
 };
+
 FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &display);
 
 MODULE_ALIAS("spi:" DRVNAME);