On 10/10/05, Manu Abraham <manu@xxxxxxxxxxx> wrote:
Jiri Slaby wrote:Divide strings not "text blabalba \
Some points to the new driver:I do agree that indentation is not so good, but how would you suggest
indentation isn't so good, the code is not readable well (80 chars on
a line mainly).
the code be wrapped ?
continue"
but with better "text blablabalasjdl"
"continue"
wrap line, if it is longer than 80 columns, near last comma, |, & and so on
You seem to use some editor with tab to be less than 8 columns and
some headers are indented bad because of it.
The problem with wrapping is that readability goes down horribly, butAnd it is called only from places, where pdev is known (i.e. in
while debugging a driver, this is too painful.
Considering that it has a long way to go still..
Well i am using it in mantis_dma.c, pci_alloc/freemantis->pdev = pdev;If you work with this out from pci functions, you should call
pci_get_dev and in exit function pci_dev_put, otherwise you don't need
it at all.
parameter of function, e.g. mantis_pci_probe). So you don't need it to
store in mantis, but only call mantis_dma_init(mantis, pdev). Read
below.
You mean rather than saving off the pointer, i do a pci_get_dev()But if you really want it, call pci_get_dev() and store it into mantis
and later on in the exit routine, i do a pci_dev_put() .. ?
struct. In the _device_ exit routine call the latter. But I think,
that not to store is better, or the best is to call
mantis_dma_init(pdev) and do pci_get_drvdata inside.
Ok,Kernel frees up the sections that won't be needed anymore. You put themantis_dma_init and others could be __devinit too, or not? Try to useAny thoughts as to why ? I am not saying it is not needed, but i would
it as much as possible.
like to know what was the idea.
function in some section by this.