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