Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add INIT_ATTR to i2c_init()

It's usually only called from init() in main.c, so this is safe.

There is one more call in system-dm320.c from system_init(), but
that's also "safe". I don't know if it's okay to call i2c_init()
twice, but presumably it works...

Change-Id: I9c1cd918d162d9955f7cf03209e836cbd5e30c57

+10 -10
+1 -1
firmware/export/i2c-coldfire.h
··· 30 30 31 31 #include "cpu.h" 32 32 33 - void i2c_init(void); 33 + void i2c_init(void) INIT_ATTR; 34 34 int i2c_read (volatile unsigned char *iface, unsigned char addr, 35 35 unsigned char *buf, int count); 36 36 int i2c_write(volatile unsigned char *iface, unsigned char addr,
+1 -1
firmware/export/i2c-rk27xx.h
··· 24 24 25 25 #include "config.h" 26 26 27 - void i2c_init(void); 27 + void i2c_init(void) INIT_ATTR; 28 28 int i2c_write(unsigned char slave, int address, int len, const unsigned char *data); 29 29 int i2c_read(unsigned char slave, int address, int len, unsigned char *data); 30 30
+1 -1
firmware/export/i2c-s5l8700.h
··· 24 24 25 25 #include "config.h" 26 26 27 - void i2c_init(void); 27 + void i2c_init(void) INIT_ATTR; 28 28 int i2c_write(unsigned char slave, int address, int len, const unsigned char *data); 29 29 int i2c_read(unsigned char slave, int address, int len, unsigned char *data); 30 30
+1 -1
firmware/export/i2c-s5l8702.h
··· 24 24 25 25 #include "config.h" 26 26 27 - void i2c_init(void); 27 + void i2c_init(void) INIT_ATTR; 28 28 int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data); 29 29 int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data); 30 30
+1 -1
firmware/export/i2c.h
··· 21 21 #ifndef I2C_H 22 22 #define I2C_H 23 23 24 - extern void i2c_init(void); 24 + extern void i2c_init(void) INIT_ATTR; 25 25 extern void i2c_begin(void); 26 26 extern void i2c_end(void); 27 27 extern int i2c_write(int device, const unsigned char* buf, int count );
+1 -1
firmware/target/arm/imx31/i2c-imx31.c
··· 367 367 return -1; 368 368 } 369 369 370 - void INIT_ATTR i2c_init(void) 370 + void i2c_init(void) 371 371 { 372 372 /* Do one-time inits for each module that will be used - leave 373 373 * module disabled and unclocked until something wants it. */
+1 -1
firmware/target/arm/imx31/i2c-imx31.h
··· 76 76 }; 77 77 78 78 /* One-time init of i2c driver */ 79 - void i2c_init(void); 79 + void i2c_init(void) INIT_ATTR; 80 80 81 81 /* Enable or disable the node - modules will be switched on/off accordingly. */ 82 82 void i2c_enable_node(struct i2c_node *node, bool enable);
+1 -1
firmware/target/arm/s3c2440/i2c-s3c2440.h
··· 41 41 /* IICLC */ 42 42 #define I2C_FLT_ENB (1 << 2) 43 43 44 - void i2c_init(void); 44 + void i2c_init(void) INIT_ATTR; 45 45 void i2c_write(int addr, const unsigned char *data, int count); 46 46
+1 -1
firmware/target/arm/tms320dm320/i2c-dm320.h
··· 24 24 25 25 #include "system.h" 26 26 27 - void i2c_init(void); 27 + void i2c_init(void) INIT_ATTR; 28 28 int i2c_write(unsigned short address, const unsigned char *data, int count); 29 29 int i2c_read(unsigned short address, unsigned char* buf, int count); 30 30
+1 -1
firmware/target/mips/ingenic_x1000/i2c-x1000.h
··· 27 27 #define I2C_FREQ_100K 100000 28 28 #define I2C_FREQ_400K 400000 29 29 30 - extern void i2c_init(void); 30 + extern void i2c_init(void) INIT_ATTR; 31 31 32 32 /* Configure the I2C controller prior to use. 33 33 *