media: Staging: media: atomisp: pci: Eliminate use of typedefs for struct
authorSrishti Sharma <srishtishar@gmail.com>
Sat, 7 Oct 2017 13:52:02 +0000 (09:52 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 10:02:16 +0000 (06:02 -0400)
commiteab638a8ae6e874a226e61b57e35032ee461e0bf
tree32dc82f42ca5a255d013c19cb0b2046a431405ba
parentec62464e83beacd8b8856e8313a4cae4a91ea90b
media: Staging: media: atomisp: pci: Eliminate use of typedefs for struct

The use of typedefs for struct is discouraged, and hence can be
eliminated. Done using the following semantic patch by coccinelle.

@r1@
type T;
@@

typedef struct {...} T;

@script: python p@
T << r1.T;
T1;
@@

if T[-2:] == "_t" or T[-2:] == "_T":
        coccinelle.T1 = T[:-2]
else:
        coccinelle.T1 = T

print T, T1
@r2@
type r1.T;
identifier p.T1;
@@

- typedef
struct
+ T1
{
...
}
- T

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c