Proton acceleration in γ-ray bursts