246 * \param args arguments (optional) |
246 * \param args arguments (optional) |
247 */ |
247 */ |
248 #define EC_DBG(fmt, args...) \ |
248 #define EC_DBG(fmt, args...) \ |
249 printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) |
249 printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) |
250 |
250 |
251 /** Convenience macro for defining read-only SysFS attributes. |
|
252 * |
|
253 * This results in creating a static variable called attr_\a NAME. The SysFS |
|
254 * file will be world-readable. |
|
255 * |
|
256 * \param NAME name of the attribute to create. |
|
257 */ |
|
258 #define EC_SYSFS_READ_ATTR(NAME) \ |
|
259 static struct attribute attr_##NAME = { \ |
|
260 .name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO \ |
|
261 } |
|
262 |
|
263 /** Convenience macro for defining read-write SysFS attributes. |
|
264 * |
|
265 * This results in creating a static variable called attr_\a NAME. The SysFS |
|
266 * file will be word-readable plus owner-writable. |
|
267 * |
|
268 * \param NAME name of the attribute to create. |
|
269 */ |
|
270 #define EC_SYSFS_READ_WRITE_ATTR(NAME) \ |
|
271 static struct attribute attr_##NAME = { \ |
|
272 .name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO | S_IWUSR \ |
|
273 } |
|
274 |
|
275 /*****************************************************************************/ |
251 /*****************************************************************************/ |
276 |
252 |
277 extern char *ec_master_version_str; |
253 extern char *ec_master_version_str; |
278 |
254 |
279 /*****************************************************************************/ |
255 /*****************************************************************************/ |