Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: pxa: remove DBGFS_FUNC_DECL()

We already have the DEFINE_SHOW_ATTRIBUTE, There is no need to define
such a macro, so remove DBGFS_FUNC_DECL.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yangtao Li and committed by
Vinod Koul
e00f50a7 0f7ab39a

+12 -24
+12 -24
drivers/dma/pxa_dma.c
··· 189 189 #include <linux/uaccess.h> 190 190 #include <linux/seq_file.h> 191 191 192 - static int dbg_show_requester_chan(struct seq_file *s, void *p) 192 + static int requester_chan_show(struct seq_file *s, void *p) 193 193 { 194 194 struct pxad_phy *phy = s->private; 195 195 int i; ··· 220 220 #define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "") 221 221 #define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "") 222 222 223 - static int dbg_show_descriptors(struct seq_file *s, void *p) 223 + static int descriptors_show(struct seq_file *s, void *p) 224 224 { 225 225 struct pxad_phy *phy = s->private; 226 226 int i, max_show = 20, burst, width; ··· 263 263 return 0; 264 264 } 265 265 266 - static int dbg_show_chan_state(struct seq_file *s, void *p) 266 + static int chan_state_show(struct seq_file *s, void *p) 267 267 { 268 268 struct pxad_phy *phy = s->private; 269 269 u32 dcsr, dcmd; ··· 306 306 return 0; 307 307 } 308 308 309 - static int dbg_show_state(struct seq_file *s, void *p) 309 + static int state_show(struct seq_file *s, void *p) 310 310 { 311 311 struct pxad_device *pdev = s->private; 312 312 ··· 317 317 return 0; 318 318 } 319 319 320 - #define DBGFS_FUNC_DECL(name) \ 321 - static int dbg_open_##name(struct inode *inode, struct file *file) \ 322 - { \ 323 - return single_open(file, dbg_show_##name, inode->i_private); \ 324 - } \ 325 - static const struct file_operations dbg_fops_##name = { \ 326 - .open = dbg_open_##name, \ 327 - .llseek = seq_lseek, \ 328 - .read = seq_read, \ 329 - .release = single_release, \ 330 - } 331 - 332 - DBGFS_FUNC_DECL(state); 333 - DBGFS_FUNC_DECL(chan_state); 334 - DBGFS_FUNC_DECL(descriptors); 335 - DBGFS_FUNC_DECL(requester_chan); 320 + DEFINE_SHOW_ATTRIBUTE(state); 321 + DEFINE_SHOW_ATTRIBUTE(chan_state); 322 + DEFINE_SHOW_ATTRIBUTE(descriptors); 323 + DEFINE_SHOW_ATTRIBUTE(requester_chan); 336 324 337 325 static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev, 338 326 int ch, struct dentry *chandir) ··· 336 348 337 349 if (chan) 338 350 chan_state = debugfs_create_file("state", 0400, chan, dt, 339 - &dbg_fops_chan_state); 351 + &chan_state_fops); 340 352 if (chan_state) 341 353 chan_descr = debugfs_create_file("descriptors", 0400, chan, dt, 342 - &dbg_fops_descriptors); 354 + &descriptors_fops); 343 355 if (chan_descr) 344 356 chan_reqs = debugfs_create_file("requesters", 0400, chan, dt, 345 - &dbg_fops_requester_chan); 357 + &requester_chan_fops); 346 358 if (!chan_reqs) 347 359 goto err_state; 348 360 ··· 363 375 goto err_root; 364 376 365 377 pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root, 366 - pdev, &dbg_fops_state); 378 + pdev, &state_fops); 367 379 if (!pdev->dbgfs_state) 368 380 goto err_state; 369 381